Quaternion

Constructors

this
this(float x, float y, float z, float w)

Members

Functions

getConjugate
Quaternion getConjugate()
getMagnitude
float getMagnitude()

Returns the magnitude of the quaternion

getNormalized
Quaternion getNormalized()

Returns a normalized copy of this quaternion

normalize
void normalize()

Normalizes the quaternion

opAdd
Quaternion opAdd(Quaternion quaternion)
Undocumented in source. Be warned that the author may not have intended to support it.
opAddAssign
Quaternion opAddAssign(Quaternion quaternion)
Undocumented in source. Be warned that the author may not have intended to support it.
opDiv
Quaternion opDiv(float a)
Undocumented in source. Be warned that the author may not have intended to support it.
opDivAssign
Quaternion opDivAssign(float a)
Undocumented in source. Be warned that the author may not have intended to support it.
opMul
Vector3 opMul(Vector3 vector)
Undocumented in source. Be warned that the author may not have intended to support it.
opMul
Quaternion opMul(float a)
Undocumented in source. Be warned that the author may not have intended to support it.
opMul
Quaternion opMul(Quaternion quaternion)
Undocumented in source. Be warned that the author may not have intended to support it.
opMulAssign
Quaternion opMulAssign(float a)
Undocumented in source. Be warned that the author may not have intended to support it.
opSub
Quaternion opSub(Quaternion quaternion)
Undocumented in source. Be warned that the author may not have intended to support it.
opSubAssign
Quaternion opSubAssign(Quaternion quaternion)
Undocumented in source. Be warned that the author may not have intended to support it.
opUnary
Quaternion opUnary()
Undocumented in source. Be warned that the author may not have intended to support it.
set
void set(float x, float y, float z, float w)

Sets the values of x, y, z, and w in a single statement

setMagnitude
void setMagnitude(float magnitude)

Sets the magnitude of this quaternion

Properties

xyz
Vector3 xyz [@property getter]

Static functions

fromAxisAngle
Quaternion fromAxisAngle(Vector3 axis, float angle)

angle is in degrees

fromAxisAngle
Quaternion fromAxisAngle(float x, float y, float z, float angle)

angle is in degrees

fromEuler
Quaternion fromEuler(Vector3 euler)

Create a quaternion from euler angles in degrees

fromEuler
Quaternion fromEuler(float x, float y, float z)

Create a quaternion from euler angles in degrees

random
Quaternion random()

Creates a normalized quaternion with a random rotation and axis

Variables

w
float w;
x
float x;
y
float y;
z
float z;

Meta