# shz_vec4_reject_safe

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

> Returns the rejection of the given 4D vector, vec, onto another 4D vector, onto

```c
SHZ_INLINE shz_vec4_t shz_vec4_reject_safe(shz_vec4_t vec, shz_vec4_t onto) SHZ_NOEXCEPT;
```

Returns the rejection of the given 4D vector, `vec`, onto another 4D vector, `onto`.

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `vec` | `shz_vec4_t` |  |
| `onto` | `shz_vec4_t` |  |

## Returns

`shz_vec4_t`

## Notes

- This routine safely returns `vec` unchanged when `onto` has a magnitude of 0.0f.

## Naming and requirements

- `_safe`: Guards degenerate input (zero-length vectors, zero denominators) at a small cost. ([Naming and Suffixes](https://sh4zam.com/concepts/naming-and-suffixes/))

## Availability

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