Quat:mul

Multiplies this quaternion by another value. If the value is a quaternion, the rotations in the two quaternions are applied sequentially and the result is stored in the first quaternion. If the value is a vector, then the input vector is rotated by the quaternion and returned.


q = Quat:mul(r)

Arguments

NameTypeDescription
rquat A quaternion to combine with the original.

Returns

NameTypeDescription
qquat The original quaternion.

v3 = Quat:mul(v3)

Arguments

NameTypeDescription
v3vec3 A vector to rotate.

Returns

NameTypeDescription
v3vec3 Vector rotated by quaternion.

See also