# shz_vec2_rotate_u16

Source: https://sh4zam.com/api/vector/shz_vec2_rotate_u16/

> Equivalent to shz_vec2_rotate(), with a 16-bit binary angle (65536 per turn, the FSCA unit)

```c
SHZ_INLINE shz_vec2_t shz_vec2_rotate_u16(shz_vec2_t vec, uint16_t radians16) SHZ_NOEXCEPT;
```

Equivalent to `shz_vec2_rotate()`, with a 16-bit binary angle (65536 per turn, the FSCA unit).

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `vec` | `shz_vec2_t` | The vector to rotate. |
| `radians16` | `uint16_t` | Angle of rotation about the Z axis, as a 16-bit binary angle. |

## Returns

`vec` rotated by `radians16`.

## Details

For games whose orientations are stored as 16-bit angles. Signed 16-bit angles can be passed as they are. The angle goes to FSCA as given, where `shz_vec2_rotate()` scales radians back to this unit and truncates with FTRC, which can land one unit short.

## 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:** none (call the C function from C++)
- **Type-generic form:** none
- **Back-ends:** SH4: shared C implementation · SW: portable C · SPU: shared C implementation
- **Defined in:** [`sh4zam/shz_vector.h:1157`](https://github.com/gyrovorbis/sh4zam/blob/6b22b851ad9ca109049f956dbbbecf7c519c959f/include/sh4zam/shz_vector.h#L1157)
- **Module:** [Vector](https://sh4zam.com/api/vector/), section "Rotations"

## See also

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