Quaternion

Aquaternionis the quotient of two 3D vectors and is used in 3D graphics and in accelerometer-based sensors to represent orientation or rotational data.

While mathematical quaternions are more involved than this, theunit quaternions(orrotational quaternions) used to represent rotation while usingWebGLorWebXR,for example, are represented using the same syntax as a 3D point. As such, the typeDOMPoint(orDOMPointReadOnly) is used to store quaternions.

See also