# shz_xmtrx_init_perspective

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

```c
SHZ_INLINE void shz_xmtrx_init_perspective(float fov, float aspect, float znear) SHZ_NOEXCEPT;
```

Initializes XMTRX to a perspective projection matrix.

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `fov` | `float` |  |
| `aspect` | `float` |  |
| `znear` | `float` |  |

## Returns

Nothing (`void`).

## Warnings

- This routine clobbers any previous XMTRX contents.

## Availability

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