Quaternion(a, b, c, d) is a + b*i + c*j + d*k. +, -, * (Hamilton
product), / and ^ with an integer power work; over the real field a
complex scalar z acts as the quaternion re(z) + im(z)*i, as in SymPy.
quat_conjugate(), quat_norm(), quat_inverse() and
quat_to_rotation_matrix() follow SymPy.
Usage
Quaternion(a = 0, b = 0, c = 0, d = 0, real_field = TRUE)
quat_conjugate(q)
quat_norm(q)
quat_inverse(q)
quat_to_rotation_matrix(q)