public class Rotation extends java.lang.Object
Constructor and Description |
---|
Rotation(float yaw,
float pitch) |
Modifier and Type | Method and Description |
---|---|
Rotation |
add(Rotation other)
Adds the yaw/pitch of the specified rotations to this
rotation's yaw/pitch, and returns the result.
|
Rotation |
clamp() |
static float |
clampPitch(float pitch)
Clamps the specified pitch value between -90 and 90.
|
float |
getPitch() |
float |
getYaw() |
boolean |
isReallyCloseTo(Rotation other)
Is really close to
|
Rotation |
normalize() |
Rotation |
normalizeAndClamp() |
static float |
normalizeYaw(float yaw)
Normalizes the specified yaw value between -180 and 180.
|
Rotation |
subtract(Rotation other)
Subtracts the yaw/pitch of the specified rotations from this
rotation's yaw/pitch, and returns the result.
|
java.lang.String |
toString() |
boolean |
yawIsReallyClose(Rotation other) |
public Rotation(float yaw, float pitch)
public float getYaw()
public float getPitch()
public Rotation add(Rotation other)
other
- Another rotationpublic Rotation subtract(Rotation other)
other
- Another rotationpublic Rotation normalizeAndClamp()
public boolean isReallyCloseTo(Rotation other)
other
- another rotationpublic boolean yawIsReallyClose(Rotation other)
public static float clampPitch(float pitch)
pitch
- The input pitchpublic static float normalizeYaw(float yaw)
yaw
- The input yawpublic java.lang.String toString()
toString
in class java.lang.Object