Quaternion
A quaternion of single-precision floats used for 3D rotations and orientations. The quaternion is normalized during construction if no parameters are specified.
Constructors
Creates a new quaternion with the specified components.
Creates a Quaternion from a Float3 for the imaginary part and a Float for the real part.
Creates a Quaternion from a Float4 representing (x, y, z, w).
Creates a new quaternion from the specified quaternion q.
Functions
Divides all components of this quaternion by a scalar.
Returns the component at the specified index.
Returns the component at the specified index (0 to 3).
Returns three components at the specified indices as a Float3.
Returns four components at the specified indices as a Quaternion.
Subtracts two quaternions.
Subtracts a scalar from all components of this quaternion.
Adds two quaternions.
Adds a scalar to all components of this quaternion.
Sets the component at the specified index.
Sets the component at the specified index (0 to 3).
Sets the components at the specified indices.
Rotates a vector by this quaternion.
Multiplies two quaternions.
Multiplies all components of this quaternion by a scalar.
Converts this quaternion to Euler angles (in degrees).
Returns the components of this quaternion as a FloatArray.
Negates all components of this quaternion.