MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ smootherstep()

template<typename T >
constexpr T MayaFlux::Kinesis::smootherstep ( lo,
hi,
x 
)
constexprnoexcept

Ken Perlin's quintic smootherstep: C2-continuous in [lo, hi].

Derivative is zero at both endpoints (unlike smoothstep which has zero first derivative only). Use when second-derivative continuity matters: camera motion, envelope transitions, SDF blending weights.

Definition at line 94 of file Scalar.hpp.

95{
96 const T t = std::clamp((x - lo) / (hi - lo), T { 0 }, T { 1 });
97 return t * t * t * (t * (t * T { 6 } - T { 15 }) + T { 10 });
98}