# shz_quat_from_rotation_xyz

Source: https://sh4zam.com/api/quat/shz_quat_from_rotation_xyz/

> Returns the quaternion of the rotation shz_xmtrx_init_rotation_xyz() builds, from angles in radians

```c
SHZ_INLINE shz_quat_t shz_quat_from_rotation_xyz(float xAngle, float yAngle, float zAngle) SHZ_NOEXCEPT;
```

Returns the quaternion of the rotation `shz_xmtrx_init_rotation_xyz()` builds, from angles in radians.

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `xAngle` | `float` |  |
| `yAngle` | `float` |  |
| `zAngle` | `float` |  |

## Returns

`shz_quat_t`

## Details

The result equals the product of the axis quaternions in the order of the name, Qx \* Qy \* Qz, so it describes the same orientation as the matrix of the same name.

## Availability

- **C++ equivalent:** [`shz::quat::from_rotation_xyz`](https://sh4zam.com/api/cpp/quat/#from_rotation_xyz)
- **Type-generic form:** none
- **Back-ends:** SH4: shared C implementation · SW: portable C · SPU: shared C implementation
- **Defined in:** [`sh4zam/shz_quat.h:82`](https://github.com/gyrovorbis/sh4zam/blob/ba1e30c88d49df0311870b229e1dd860ef26c477/include/sh4zam/shz_quat.h#L82)
- **Module:** [Quaternion](https://sh4zam.com/api/quat/), section "Initialization"

## See also

[`shz_quat_from_rotation_xyz_u16`](https://sh4zam.com/api/quat/shz_quat_from_rotation_xyz_u16/), [`shz_xmtrx_init_rotation_xyz`](https://sh4zam.com/api/xmtrx/shz_xmtrx_init_rotation_xyz/), [`shz_xmtrx_init_rotation_quat`](https://sh4zam.com/api/xmtrx/shz_xmtrx_init_rotation_quat/)
