MathUtil

@ApiStatus.Internal
class MathUtil

Math

Properties

Link copied to clipboard
val DEGREES_TO_RADIANS: Float = 0.017453292f
Degrees to radians
Link copied to clipboard
Minecraft tick mills
Link copied to clipboard
Multiplier value for convert model size to block size
Link copied to clipboard
val RADIANS_TO_DEGREES: Float = 57.29578f
Radians to degrees
Link copied to clipboard
val ROTATION_DEGREE: Float = 22.5f
Valid rotation degree
Link copied to clipboard
Valid rotation degrees

Functions

Link copied to clipboard
@NotNull
open fun animationToDisplay(@NotNull vector: @NotNull Vector3f): @NotNull Vector3f
Converts animation rotation to display rotation
Link copied to clipboard
open fun checkValidDegree(rotation: Float): Boolean
Checks this float is valid Minecraft degree
open fun checkValidDegree(@NotNull rotation: @NotNull Float3): Boolean
Checks these floats are valid Minecraft degree
Link copied to clipboard
open fun fma(a: Float, b: Float, c: Float): Float
@NotNull
open fun fma(@NotNull a: @NotNull Vector3f, b: Float, @NotNull c: @NotNull Vector3f): @NotNull Vector3f
@NotNull
open fun fma(@NotNull a: @NotNull Vector3f, @NotNull b: @NotNull Vector3f, @NotNull c: @NotNull Vector3f): @NotNull Vector3f
Link copied to clipboard
@NotNull
open fun identifier(@NotNull rotation: @NotNull Float3): @NotNull Float3
Creates rotation identifier
Link copied to clipboard
@NotNull
open fun toMatrix(@NotNull quaternion: @NotNull Quaternionf): @NotNull Matrix3f
Gets rotation matrix of quaternion
Link copied to clipboard
@NotNull
open fun toQuaternion(@NotNull vector: @NotNull Vector3f): @NotNull Quaternionf
Converts vector rotation to quaternion
Link copied to clipboard
@NotNull
open fun toXYZEuler(@NotNull mat: @NotNull Matrix3f): @NotNull Vector3f
Gets xyz euler of this matrix
@NotNull
open fun toXYZEuler(@NotNull quaternion: @NotNull Quaternionf): @NotNull Vector3f
Converts zxy euler to xyz euler
@NotNull
open fun toXYZEuler(@NotNull vec: @NotNull Vector3f): @NotNull Vector3f
Converts zyx euler to xyz euler
Link copied to clipboard
@NotNull
open fun transformToDisplay(@NotNull vector: @NotNull Vector3f): @NotNull Vector3f
Converts animation position to display position