# shz_xmtrx_rotate_dir

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

```c
SHZ_INLINE void shz_xmtrx_rotate_dir(float radians, float x, float y, float z) SHZ_NOEXCEPT;
```

Multiplies XMTRX by a 3D rotation matrix about a prenormalized axis.

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `radians` | `float` | Angle of rotation, in radians. |
| `x` | `float` | X component of the unit axis of rotation. |
| `y` | `float` | Y component of the unit axis of rotation. |
| `z` | `float` | Z component of the unit axis of rotation. |

## Returns

Nothing (`void`).

## Details

This is a faster version of `shz_xmtrx_rotate()` which skips normalizing the axis of rotation. Constructs a 4x4 rotation matrix of `radians` about the given axis, RIGHT multiplying it into XMTRX, leaving its translation column unmodified.

## Warnings

- The vector components representing the axis of rotation must be prenormalized!

## Availability

- **C++ equivalent:** none (call the C function from C++)
- **Type-generic form:** none
- **Back-ends:** SH4: dedicated SH4 implementation · SW: portable C · SPU: shared C implementation
- **Defined in:** [`sh4zam/shz_xmtrx.h:841`](https://github.com/gyrovorbis/sh4zam/blob/6b22b851ad9ca109049f956dbbbecf7c519c959f/include/sh4zam/shz_xmtrx.h#L841)
- **Module:** [XMTRX](https://sh4zam.com/api/xmtrx/), section "GL Transformations"

## See also

[`shz_xmtrx_rotate`](https://sh4zam.com/api/xmtrx/shz_xmtrx_rotate/), [`shz_xmtrx_init_rotation_dir`](https://sh4zam.com/api/xmtrx/shz_xmtrx_init_rotation_dir/)
