Skip to content

shz_vec2_smoothstepv_safe

Markdown
SHZ_INLINE shz_vec2_t shz_vec2_smoothstepv_safe(shz_vec2_t vec, shz_vec2_t edge0, shz_vec2_t edge1) SHZ_NOEXCEPT;

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

NameTypeDescription
vecshz_vec2_t
edge0shz_vec2_t
edge1shz_vec2_t

shz_vec2_t

  • _safe: Guards degenerate input (zero-length vectors, zero denominators) at a small cost. (Naming and Suffixes)
  • C++ equivalent: none (call the C function from C++)
  • Type-generic form: shz_vec_smoothstepv_safe()
  • Back-ends: SH4: shared C implementation · SW: portable C · SPU: shared C implementation
  • Defined in: sh4zam/shz_vector.h:318
  • Module: Vector, section "Component-wise Operations"