# shz_smoothstepf_safe

Source: https://sh4zam.com/api/scalar/shz_smoothstepf_safe/

```c
SHZ_INLINE float shz_smoothstepf_safe(float x, float edge0, float edge1) SHZ_NOEXCEPT;
```

Returns 0.0f at/below edge0, 1.0f at/above edge1, smoothly varying in-between. Accepts inverse edges.

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `x` | `float` |  |
| `edge0` | `float` |  |
| `edge1` | `float` |  |

## Returns

`float`

## 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::smoothstepf_safe`](https://sh4zam.com/api/cpp/#shzsmoothstepf_safe)
- **Type-generic form:** none
- **Back-ends:** SH4: shared C implementation · SW: portable C · SPU: shared C implementation
- **Defined in:** [`sh4zam/shz_scalar.h:267`](https://github.com/gyrovorbis/sh4zam/blob/ba1e30c88d49df0311870b229e1dd860ef26c477/include/sh4zam/shz_scalar.h#L267)
- **Module:** [Scalar](https://sh4zam.com/api/scalar/), section "Miscellaneous"
