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.
Inverts the quaternion.
Makes the current quaternion an identity quaternion.
Normalizes the current quaternion.
Returns a normalized copy of the current quaternion.
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 matrix.
Returns the current vector formatted as string, useful for printing the quaternion.
Returns an identity quaternion (w=1, x=0, y=0, z=0).
Returns an inverted copy of the current 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.
Returns the pitch.
Returns the roll.
Returns a pointer to the quaternion in memory, it starts with the w coordinate.
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 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.