Package net.minecraft.util
Class SegmentedAnglePrecision
java.lang.Object
net.minecraft.util.SegmentedAnglePrecision
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final float
private final float
private final int
private final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
fromDegrees
(float degrees) int
fromDegreesWithTurns
(float degreesWithTurns) int
fromDirection
(Direction direction) int
getMask()
boolean
isSameAxis
(int first, int second) int
normalize
(int degrees) float
toDegrees
(int degreesWithTurns) float
toDegreesWithTurns
(int degrees)
-
Field Details
-
mask
private final int mask -
precision
private final int precision -
degreeToAngle
private final float degreeToAngle -
angleToDegree
private final float angleToDegree
-
-
Constructor Details
-
SegmentedAnglePrecision
public SegmentedAnglePrecision(int precision)
-
-
Method Details
-
isSameAxis
public boolean isSameAxis(int first, int second) -
fromDirection
-
fromDegreesWithTurns
public int fromDegreesWithTurns(float degreesWithTurns) -
fromDegrees
public int fromDegrees(float degrees) -
toDegreesWithTurns
public float toDegreesWithTurns(int degrees) -
toDegrees
public float toDegrees(int degreesWithTurns) -
normalize
public int normalize(int degrees) -
getMask
public int getMask()
-