# shz_vec2_half_angle

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

```c
SHZ_INLINE shz_vec2_t shz_vec2_half_angle(shz_vec2_t a, shz_vec2_t b) SHZ_NOEXCEPT;
```

Returns the 2D unit vector pointing halfway between the two vectors. Used for lighting.

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `a` | `shz_vec2_t` |  |
| `b` | `shz_vec2_t` |  |

## Returns

`shz_vec2_t`

## Availability

- **C++ equivalent:** [`shz::vec2::half_angle`](https://sh4zam.com/api/cpp/vec2/#half_angle)
- **Type-generic form:** [`shz_vec_half_angle()`](https://sh4zam.com/api/vector/shz_vec_half_angle/)
- **Back-ends:** SH4: shared C implementation · SW: portable C · SPU: shared C implementation
- **Defined in:** [`sh4zam/shz_vector.h:912`](https://github.com/gyrovorbis/sh4zam/blob/6b22b851ad9ca109049f956dbbbecf7c519c959f/include/sh4zam/shz_vector.h#L912)
- **Module:** [Vector](https://sh4zam.com/api/vector/), section "Binary Operations"
