MathUtil

@ApiStatus.Internal
class MathUtil

Math

Properties

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: Vector3f): Vector3f
Converts animation rotation to display rotation
Link copied to clipboard
@NotNull
open fun blockBenchToDisplay(@NotNull vector: Vector3f): Vector3f
Converts BlockBench position (right-hand) to display position (left-hand)
Link copied to clipboard
open fun checkValidDegree(rotation: Float): Boolean
Checks this float is valid Minecraft degree
open fun checkValidDegree(@NotNull rotation: Float3): Boolean
Checks these floats are valid Minecraft degree
Link copied to clipboard
@NotNull
open fun identifier(@NotNull rotation: Float3): Float3
Creates rotation identifier
Link copied to clipboard
@NotNull
open fun toDegrees(@NotNull vector: Vector3f): Vector3f
Converts radians to degrees
Link copied to clipboard
@NotNull
open fun toMatrix(@NotNull quaternion: Quaternionf): Matrix3f
Gets rotation matrix of quaternion
Link copied to clipboard
@NotNull
open fun toMinecraftVector(@NotNull vec: Vector3f): Vector3f
Converts zxy euler to xyz euler
Link copied to clipboard
@NotNull
open fun toQuaternion(@NotNull vector: Vector3f): Quaternionf
Converts vector rotation to quaternion
Link copied to clipboard
@NotNull
open fun toRadians(@NotNull vector: Vector3f): Vector3f
Converts degrees to radians
Link copied to clipboard
@NotNull
open fun toXYZEuler(@NotNull mat: Matrix3f): Vector3f
Gets xyz euler of this matrix
@NotNull
open fun toXYZEuler(@NotNull quaternion: Quaternionf): Vector3f
Converts zxy euler to xyz euler
Link copied to clipboard
@NotNull
open fun transformToDisplay(@NotNull vector: Vector3f): Vector3f
Converts animation position to display position