Returns a new quaternion. If value is undefined, then {x: 0, y: 0, z: 0, w: 1} is returned.
Creates a Quaternion that is rotated the given radians around an axis.
The axis to rotate around.
The rotation, in radians.
A rotated quaternion.
Parses a JSON string representation of a Quaternion.
A JSON string either in the form of [x, y, z, w] or {"x": 0, "y": 0, "z": 0, "w": 0}.
A parsed Quaternion.
Returns a quaternion using the upper 3x3 of a pure rotation matrix (unscaled).
Type guard that checks if the given type is a Quaternion.
Returns the magnitude of the provided quaternion.
Multiplies a x b and returns a new quaternion with the result.
Returns a quaternion with that will have a magnitude of 1.
Returns a quaternion where each component is multiplied by the scalar.
An array representation of a
Quaternion.