Back to Content

Quaternion

files/en-us/glossary/quaternion/index.md

latest839 B
Original Source

A quaternion is 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, the unit quaternions (or rotational quaternions) used to represent rotation while using {{Glossary("WebGL")}} or WebXR, for example, are represented using the same syntax as a 3D point. As such, the type {{domxref("DOMPoint")}} (or {{domxref("DOMPointReadOnly")}}) is used to store quaternions.

See also