# shz_quat_from_rotation_xyz_u16

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

> Equivalent to shz_quat_from_rotation_xyz(), with 16-bit binary angles (65536 per turn, the FSCA unit)

```c
SHZ_INLINE shz_quat_t shz_quat_from_rotation_xyz_u16(uint16_t xAngle, uint16_t yAngle, uint16_t zAngle) SHZ_NOEXCEPT;
```

Equivalent to `shz_quat_from_rotation_xyz()`, with 16-bit binary angles (65536 per turn, the FSCA unit).

## Parameters

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

## Returns

`shz_quat_t`

## Details

For games whose orientations are stored as 16-bit angles, such as N64 titles. Signed 16-bit angles can be passed as they are. The half angles go to FSCA directly, without a conversion to radians, so an odd angle is off by half a unit (1/131072 of a turn) in its half angle.

## Naming and requirements

- `u16`: Angle is a 16-bit fixed-point value: 0..65535 maps to 0..2π, the native `FSCA` input format. ([Naming and Suffixes](https://sh4zam.com/concepts/naming-and-suffixes/))

## Availability

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

## See also

[`shz_sincosu16`](https://sh4zam.com/api/trig/shz_sincosu16/)
