Module geo_nd::quat

source ·
Expand description

Quaternion module

Functions

Apply the quaternion to a vector3
Apply the quaternion to a vector3
Return the axis of the rotation and the angle from the quaternion
Return the breakdown of a quaternion
Find the conjugate of a quaternion
Get a measure of the ‘distance’ between two quaternions
Get a measure of the ‘distance’ between two quaternions
Multiply one quaternion by the conjugate of the other / len2 of other
Create an identity quaternion
Get the quaternion inverse
Create quaternion for a rotation that maps unit dirn to (0,0,-1) and unit up to (0,1,0)
Multiply two quaternions together
1 - 2j2 - 2k2 2ij - 2kr 2ik + 2jr 2ij + 2kr 1 - 2i2 - 2k2 2jk - 2ir 2ik - 2jr 2jk + 2ir 1 - 2i2 - 2j2
A simple normalized LERP from one quaterion to another (not spherical)
Find the conjugate of a quaternion
Find the quaternion for a rotation of an angle around an axis
Create a quaternion from its components
Find the quaternion of a Matrix3 assuming it is purely a rotation
Apply a rotation about the X-axis to this quaternion
Apply a rotation about the Y-axis to this quaternion
Apply a rotation about the Z-axis to this quaternion
Get a quaternion that is a rotation of one vector to another
Convert the quaternion to a bank, heading, altitude tuple - applied in that order
Convert a matrix-3 from the quaternion
Convert to a matrix-4 from a unit quaternion
Calculate the weighted average of many unit quaternions
Calculate the weighted average of two unit quaternions