# shz_vec4_half_angle

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

```c
SHZ_INLINE shz_vec4_t shz_vec4_half_angle(shz_vec4_t a, shz_vec4_t b) SHZ_NOEXCEPT;
```

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

## Parameters

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

## Returns

`shz_vec4_t`

## Availability

- **C++ equivalent:** [`shz::vec4::half_angle`](https://sh4zam.com/api/cpp/vec4/#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:918`](https://github.com/gyrovorbis/sh4zam/blob/6b22b851ad9ca109049f956dbbbecf7c519c959f/include/sh4zam/shz_vector.h#L918)
- **Module:** [Vector](https://sh4zam.com/api/vector/), section "Binary Operations"
