Constructs the quaternion. Takes a 4-dimensional vector, where vector.x = the quaternions w coordinate, or a w coordinate of type qt and a 3-dimensional vector representing the imaginary part, or 4 values of type qt.
Returns an inverted copy of the current quaternion.
Inverts the quaternion.
Returns true if all values are not nan and finite, otherwise false.
Returns the magnitude of the quaternion.
Returns the squared magnitude of the quaternion.
Makes the current quaternion an identity quaternion.
Normalizes the current quaternion.
Returns a normalized copy of the current quaternion.
Returns the pitch.
Returns a pointer to the quaternion in memory, it starts with the w coordinate.
Returns the roll.
Rotates the current quaternion around an axis and returns this.
Applies an euler rotation to the current quaternion and returns this.
Rotates the current quaternion around the x-axis and returns this.
Rotates the current quaternion around the y-axis and returns this.
Rotates the current quaternion around the z-axis and returns this.
Returns the quaternion as a vec3 (axis / angle representation).
Gets a hash of this item
Returns the quaternion as matrix.
Returns the current vector formatted as string, useful for printing the quaternion.
Returns the yaw.
Returns a quaternion with applied rotation around an axis.
Creates a quaternion from an euler rotation.
Creates a quaternion from a 3x3 matrix.
Returns an identity quaternion (w=1, x=0, y=0, z=0).
Makes a quaternion with the specified forward and upwards directions in a Unity compatible manner. Implementation from http://answers.unity3d.com/questions/467614/what-is-the-source-code-of-quaternionlookrotation.html
Returns a quaternion with applied rotation around the x-axis.
Returns a quaternion with applied rotation around the y-axis.
Returns a quaternion with applied rotation around the z-axis.
Holds the w, x, y and z coordinates.
Base template for all quaternion-types.