shz_vec2_smoothstep_safe
SHZ_INLINE shz_vec2_t shz_vec2_smoothstep_safe(shz_vec2_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
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
vec | shz_vec2_t | |
edge0 | float | |
edge1 | float |
Returns
Section titled “Returns”shz_vec2_t
Naming and requirements
Section titled “Naming and requirements”_safe: Guards degenerate input (zero-length vectors, zero denominators) at a small cost. (Naming and Suffixes)
Availability
Section titled “Availability”- C++ equivalent:
shz::vec2::smoothstep_safe - Type-generic form:
shz_vec_smoothstep_safe() - Back-ends: SH4: shared C implementation · SW: portable C · SPU: shared C implementation
- Defined in:
sh4zam/shz_vector.h:309 - Module: Vector, section "Component-wise Operations"