# shz_vec2_cross

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

```c
SHZ_INLINE float shz_vec2_cross(shz_vec2_t vec1, shz_vec2_t vec2) SHZ_NOEXCEPT;
```

Returns the cross product, as a scalar, between two 2D vectors.

## Parameters

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

## Returns

`float`

## Notes

- The definition of the cross-product is ambiguous in 2D space, but the geometric interpretation here is that the result is the magnitude of the orthogonal vector created from the given two along the Z-axis.

## Availability

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