A class representing quaternion numbers.
Part of MathLib, a diverse library of mathematical functions.
Create a new quaternion with the given scalar and vector parts.
a |
scalar part |
b |
vector part b |
c |
vector part c |
d |
vector part d |
a new instance of Quaternion.
Create a new quaternion with scalar and vector parts randomly choosen between min and max.
min |
minimum value |
max |
maximum value |
a new instance of Quaternion.
Return the scalar part.
Return the vector part b.
Return the vector part c.
Return the vector part d.
Return the scalar and vector parts.
Return the conjugate of q is the quaternion
Return the square root of the product of a quaternion with its conjugate.
Return the distance between two quaternions.