# shz_xmtrx_init_rotation_quat

Source: https://sh4zam.com/api/xmtrx/shz_xmtrx_init_rotation_quat/

```c
void shz_xmtrx_init_rotation_quat(shz_quat_t q) SHZ_NOEXCEPT;
```

Initializes XMTRX to a 3D rotation matrix with its orientation given by a quaternion.

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `q` | `shz_quat_t` |  |

## Returns

Nothing (`void`).

## Warnings

- This routine clobbers any previous XMTRX contents.
- This routine is out-of-line.

## Availability

- **C++ equivalent:** [`shz::xmtrx::init_rotation_quat`](https://sh4zam.com/api/cpp/xmtrx/#init_rotation_quat)
- **Type-generic form:** none
- **Back-ends:** SH4: shared C implementation · SW: portable C · SPU: shared C implementation
- **Defined in:** [`sh4zam/shz_xmtrx.h:395`](https://github.com/gyrovorbis/sh4zam/blob/ba1e30c88d49df0311870b229e1dd860ef26c477/include/sh4zam/shz_xmtrx.h#L395)
- **Module:** [XMTRX](https://sh4zam.com/api/xmtrx/), section "Initialization"
