pub type Quaternion<T> = (T, [T; 3]);
Expand description
Quaternion
The type (q0, [q1, q2, q3])
is equivalent to the expression q0 + q1i + q2j + q3k
,
where 1
, i
, j
, k
are basis of quaternions and satisfy the following equality:
i^2 = j^2 = k^2 = ijk = -1