Quat:unpack

Returns the components of the quaternion as numbers, either in an angle/axis representation or as raw quaternion values.

a, b, c, d = Quat:unpack(raw)

Arguments

NameTypeDefaultDescription
rawbooleanfalse Whether the values should be returned as raw values instead of angle/axis.

Returns

NameTypeDescription
anumber The angle in radians, or the x value.
bnumber The x component of the rotation axis or the y value.
cnumber The y component of the rotation axis or the z value.
dnumber The z component of the rotation axis or the w value.

See also