Quat
EditA quat
is a math type that represents a 3D rotation, stored as four numbers.
Constructors
lovr.math.newQuat | Create a new Quat. |
lovr.math.quat | Create a temporary Quat. |
Methods
Quat:conjugate | Conjugate (invert) the quaternion. |
Quat:direction | Get the direction of the quaternion. |
Quat:equals | Check if a quaternion equals another quaternion. |
Quat:getEuler | Get the euler angles of the quaternion. |
Quat:length | Get the length of the quaternion. |
Quat:mul | Multiply a quaternion by another quaternion or a vector. |
Quat:normalize | Normalize the length of the quaternion to 1. |
Quat:set | Set the components of the quaternion. |
Quat:setEuler | Set the value of the quaternion using euler angles. |
Quat:slerp | Moves this quaternion some amount towards another one. |
Quat:unpack | Get the components of the quaternion. |