# shz_vec3_smoothstep_safe

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

```c
SHZ_INLINE shz_vec3_t shz_vec3_smoothstep_safe(shz_vec3_t vec, float edge0, float edge1) SHZ_NOEXCEPT;
```

For each component: returns 0.0f at/below edge0, 1.0f at/above edge1, smoothly varying in-between. Accepts inverse edges.

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `vec` | `shz_vec3_t` |  |
| `edge0` | `float` |  |
| `edge1` | `float` |  |

## Returns

`shz_vec3_t`

## 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::vec3::smoothstep_safe`](https://sh4zam.com/api/cpp/vec3/#smoothstep_safe)
- **Type-generic form:** [`shz_vec_smoothstep_safe()`](https://sh4zam.com/api/vector/shz_vec_smoothstep_safe/)
- **Back-ends:** SH4: shared C implementation · SW: portable C · SPU: shared C implementation
- **Defined in:** [`sh4zam/shz_vector.h:312`](https://github.com/gyrovorbis/sh4zam/blob/ba1e30c88d49df0311870b229e1dd860ef26c477/include/sh4zam/shz_vector.h#L312)
- **Module:** [Vector](https://sh4zam.com/api/vector/), section "Component-wise Operations"
