Skip to content

Api > Quaternion > ToAngleAxis()


Quaternion.ToAngleAxis()⚓︎

Converts a rotation to angle-axis representation (angles in degrees).

Returns:⚓︎

type Description
number angle
Vector3 axis

Usage⚓︎

---@type Quaternion
local quaternion;


local val0, val1 = quaternion.ToAngleAxis()

Example⚓︎

Lua supports the multi-variable return using tuples. Use the function like bellow:

local angle, axis = myQuaternion.ToAngleAxis();