Package baritone.api.utils
Class Rotation
java.lang.Object
baritone.api.utils.Rotation
- Since:
- 9/25/2018
- Author:
- Brady
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds the yaw/pitch of the specified rotations to this rotation's yaw/pitch, and returns the result.clamp()static floatclampPitch(float pitch) Clamps the specified pitch value between -90 and 90.floatgetPitch()floatgetYaw()booleanisReallyCloseTo(Rotation other) Is really close tostatic floatnormalizeYaw(float yaw) Normalizes the specified yaw value between -180 and 180.Subtracts the yaw/pitch of the specified rotations from this rotation's yaw/pitch, and returns the result.toString()withPitch(float pitch) booleanyawIsReallyClose(Rotation other)
-
Constructor Details
-
Rotation
-
-
Method Details
-
getYaw
- Returns:
- The yaw of this rotation
-
getPitch
- Returns:
- The pitch of this rotation
-
add
Adds the yaw/pitch of the specified rotations to this rotation's yaw/pitch, and returns the result.- Parameters:
other- Another rotation- Returns:
- The result from adding the other rotation to this rotation
-
subtract
Subtracts the yaw/pitch of the specified rotations from this rotation's yaw/pitch, and returns the result.- Parameters:
other- Another rotation- Returns:
- The result from subtracting the other rotation from this rotation
-
clamp
- Returns:
- A copy of this rotation with the pitch clamped
-
normalize
- Returns:
- A copy of this rotation with the yaw normalized
-
normalizeAndClamp
- Returns:
- A copy of this rotation with the pitch clamped and the yaw normalized
-
withPitch
-
isReallyCloseTo
Is really close to- Parameters:
other- another rotation- Returns:
- are they really close
-
yawIsReallyClose
-
clampPitch
Clamps the specified pitch value between -90 and 90.- Parameters:
pitch- The input pitch- Returns:
- The clamped pitch
-
normalizeYaw
Normalizes the specified yaw value between -180 and 180.- Parameters:
yaw- The input yaw- Returns:
- The normalized yaw
-
toString
-