# shz_vec2_add

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

```c
SHZ_INLINE shz_vec2_t shz_vec2_add(shz_vec2_t vec1, shz_vec2_t vec2) SHZ_NOEXCEPT;
```

Returns a 2D vector whose components are the sums of the given vectors' components.

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `vec1` | `shz_vec2_t` |  |
| `vec2` | `shz_vec2_t` |  |

## Returns

`shz_vec2_t`

## Availability

- **C++ equivalent:** none (call the C function from C++)
- **Type-generic form:** [`shz_vec_add()`](https://sh4zam.com/api/vector/shz_vec_add/)
- **Back-ends:** SH4: shared C implementation · SW: portable C · SPU: shared C implementation
- **Defined in:** [`sh4zam/shz_vector.h:353`](https://github.com/gyrovorbis/sh4zam/blob/ba1e30c88d49df0311870b229e1dd860ef26c477/include/sh4zam/shz_vector.h#L353)
- **Module:** [Vector](https://sh4zam.com/api/vector/), section "Arithmetic"
