# shz_xmtrx_rotate_y_xz

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

> Multiplies and accumulates XMTRX by the rotation about the Y axis that turns local +Z toward the unit direction (x, 0, z)

```c
SHZ_INLINE void shz_xmtrx_rotate_y_xz(float x, float z) SHZ_NOEXCEPT;
```

Multiplies and accumulates XMTRX by the rotation about the Y axis that turns local +Z toward the unit direction (`x`, 0, `z`).

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `x` | `float` | X component of the unit direction. |
| `z` | `float` | Z component of the unit direction. |

## Returns

Nothing (`void`).

## Details

Equivalent to `shz_xmtrx_rotate_y()` for the angle whose sine is `x` and cosine is `z`.

## Warnings

- (`x`, `z`) must be unit length.

## Availability

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

## See also

[`shz_xmtrx_init_rotation_y_xz`](https://sh4zam.com/api/xmtrx/shz_xmtrx_init_rotation_y_xz/), [`shz_xmtrx_billboard_y`](https://sh4zam.com/api/xmtrx/shz_xmtrx_billboard_y/)
