vector4 quaternion(matrix3 rotations)
Creates a vector4 representing a quaternion from a 3×3 rotational matrix.
vector4 quaternion(float angle, vector axis)
Creates a vector4 representing a quaternion from an angle and axis. The angle is specified in radians.
vector4 quaternion(vector angleaxis)
Creates a vector4 representing a quaternion from a combined angle/axis. This is the normalized rotation axis multiplied by the rotation angle in radians.
There used to be a fourth form that took a rotation vector. It has been renamed to eulertoquaternion
and now takes radians.
For more information, see Data types and Dot operator.
See also | |
quaternion |