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
rawbooleanfalseWhether the values should be returned as raw values instead of angle/axis.

Returns

NameTypeDescription
anumberThe angle in radians, or the x value.
bnumberThe x component of the rotation axis or the y value.
cnumberThe y component of the rotation axis or the z value.
dnumberThe z component of the rotation axis or the w value.

See also