[][src]Module micromath::quaternion

Quaternions are a number system that extends the complex numbers which can be used for efficiently computing spatial rotations.

The quaternion Cargo feature must be enabled to use this functionality.

Quaternions are computed as the quotient of two directed lines in a three-dimensional space, or equivalently as the quotient of two vectors.

For given real numbers a, b, c, and d, they take the form:

a + bi + cj + dk

where i, j, and k are the fundamental quaternion units:

i² = j² = k² = i*j*k = -1

Quaternion multiplication is noncommutative:

x1ijk
11ijk
ii-1k-j
jj-k-1i
kkj-i-1

Structs

Quaternion

Quaternion