# axisFromQuaternion

[**@qbead/bloch-sphere**](https://qbead.gitbook.io/bloch-sphere/index)

***

[@qbead/bloch-sphere](https://qbead.gitbook.io/bloch-sphere/index) / axisFromQuaternion

## Function: axisFromQuaternion()

> **axisFromQuaternion**(`q`): [`RotationInfo`](https://qbead.gitbook.io/bloch-sphere/type-aliases/rotationinfo)

Defined in: [src/math/geometry.ts:127](https://github.com/qbead/bloch-sphere/blob/41247d60e67bd802cc21854379a06362e5d0957c/src/math/geometry.ts#L127)

Get axis of rotation and angle from a quaternion

### Parameters

| Parameter | Type         | Description    |
| --------- | ------------ | -------------- |
| `q`       | `Quaternion` | The quaternion |

### Returns

[`RotationInfo`](https://qbead.gitbook.io/bloch-sphere/type-aliases/rotationinfo)

The axis of rotation
