Package ac.boar.anticheat.util
Class MathUtil
java.lang.Object
ac.boar.anticheat.util.MathUtil
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intblockPosition(int x, int y, int z) static longchunkPositionToLong(int x, int z) static floatclamp(float value, float min, float max) static booleancompare(org.cloudburstmc.math.vector.Vector3i vector3i, org.cloudburstmc.math.vector.Vector3i vector3i1) static booleanequal(float d, float e) static booleanstatic booleanfinite(org.cloudburstmc.math.vector.Vector3f value) static Vec3getInputVector(Vec3 movementInput, float speed, float yaw) static Vec3getRotationVector(float pitch, float yaw) static booleanisValid(org.cloudburstmc.math.vector.Vector3f vector3i) static booleanisValid(org.cloudburstmc.math.vector.Vector3i vector3i) static floatlerp(float delta, float start, float end) static booleansameDirection(Vec3 vec3, Vec3 vec32) static booleansameDirectionHorizontal(Vec3 vec3, Vec3 vec32) static Vec3seatPosition(Vec3 actor, float yaw, org.cloudburstmc.math.vector.Vector3f offset) static org.cloudburstmc.math.vector.Vector3fseatShift(float yaw, org.cloudburstmc.math.vector.Vector3f offset) static intsign(float value) static Vec3static floatsin(float index) static floatsquare(float v) static floatwrapDegrees(float f) static floatwrapYaw(float angle)
-
Field Details
-
DEGREE_TO_RAD
public static final float DEGREE_TO_RAD- See Also:
-
-
Constructor Details
-
MathUtil
public MathUtil()
-
-
Method Details
-
sin
public static float sin(float index) -
seatShift
public static org.cloudburstmc.math.vector.Vector3f seatShift(float yaw, org.cloudburstmc.math.vector.Vector3f offset) -
seatPosition
-
finite
-
finite
public static boolean finite(org.cloudburstmc.math.vector.Vector3f value) -
sameDirection
-
sameDirectionHorizontal
-
signAll
-
sign
public static int sign(float value) -
wrapDegrees
public static float wrapDegrees(float f) -
wrapYaw
public static float wrapYaw(float angle) -
equal
public static boolean equal(float d, float e) -
lerp
public static float lerp(float delta, float start, float end) -
square
public static float square(float v) -
clamp
public static float clamp(float value, float min, float max) -
compare
public static boolean compare(org.cloudburstmc.math.vector.Vector3i vector3i, org.cloudburstmc.math.vector.Vector3i vector3i1) -
isValid
public static boolean isValid(org.cloudburstmc.math.vector.Vector3i vector3i) -
isValid
public static boolean isValid(org.cloudburstmc.math.vector.Vector3f vector3i) -
getRotationVector
-
getInputVector
-
blockPosition
public static int blockPosition(int x, int y, int z) -
chunkPositionToLong
public static long chunkPositionToLong(int x, int z)
-