quaternion.angleaxis
EditReturns a quaternion that rotates angle radians around an axis.
q = quaternion.angleaxis(angle, ax, ay, az)Arguments
| Name | Type | Description |
| angle | number | The number of radians the quaternion will rotate around the axis. |
| ax | number | The x component of the axis of rotation. |
| ay | number | The y component of the axis of rotation. |
| az | number | The z component of the axis of rotation. |
Returns
| Name | Type | Description |
| q | quaternion | The new quaternion. It will be normalized. |
Notes
The quaternion library can be called, which is shorthand for quaternion.angleaxis:
quaternion(angle, ax, ay, az) -- same as quaternion.angleaxis(angle, ax, ay, az)
Example
local q = quaternion(lovr.headset.getOrientation())`