Quat

Edit

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:equalsCheck if a quaternion equals another quaternion.
Quat:getEulerGet the euler angles 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:setEulerSet the value of the quaternion using euler angles.
Quat:slerpMoves this quaternion some amount towards another one.
Quat:unpackGet the components of the quaternion.

See also