Quat

A quat is a math type that represents a 3D rotation, stored as four numbers.

Constructors

lovr.math.newQuatCreate a new Quat.
lovr.math.quatCreate a temporary Quat.

Methods

Quat:conjugateConjugate (invert) the quaternion.
Quat:directionGet the direction of the quaternion.
Quat:lengthGet the length of the quaternion.
Quat:mulMultiply a quaternion by another quaternion or a vector.
Quat:normalizeNormalize the length of the quaternion to 1.
Quat:setSet the components of the quaternion.
Quat:slerpMoves this quaternion some amount towards another one.
Quat:unpackGet the components of the quaternion.

See also