Package net.minecraft.util.math
Class Quaternion
java.lang.Object
net.minecraft.util.math.Quaternion
public final class Quaternion extends Object
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Quaternion(float x, float y, float z, boolean degrees)Quaternion(float x, float y, float z, float w)Quaternion(Quaternion other)Quaternion(Vec3f axis, float rotationAngle, boolean degrees) -
Method Summary
Modifier and Type Method Description voidconjugate()Quaternioncopy()private static floatcos(float value)booleanequals(Object o)floatgetW()floatgetX()floatgetY()floatgetZ()voidhamiltonProduct(Quaternion other)inthashCode()voidnormalize()voidscale(float scale)voidset(float x, float y, float z, float w)private static floatsin(float value)StringtoString()
-
Field Details
-
IDENTITY
-
x
private float x -
y
private float y -
z
private float z -
w
private float w
-
-
Constructor Details
-
Quaternion
public Quaternion(float x, float y, float z, float w) -
Quaternion
-
Quaternion
@Environment(CLIENT) public Quaternion(float x, float y, float z, boolean degrees) -
Quaternion
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
toString
-
getX
public float getX() -
getY
public float getY() -
getZ
public float getZ() -
getW
public float getW() -
hamiltonProduct
-
scale
@Environment(CLIENT) public void scale(float scale) -
conjugate
public void conjugate() -
set
@Environment(CLIENT) public void set(float x, float y, float z, float w) -
cos
private static float cos(float value) -
sin
private static float sin(float value) -
normalize
@Environment(CLIENT) public void normalize() -
copy
-