FastLED 3.9.15
Loading...
Searching...
No Matches

◆ smoothstep()

static FASTLED_FORCE_INLINE s12x4 fl::s12x4::smoothstep ( s12x4 edge0,
s12x4 edge1,
s12x4 x )
inlinestatic

Definition at line 141 of file s12x4.h.

141 {
142 constexpr s12x4 zero(0.0f);
143 constexpr s12x4 one(1.0f);
144 constexpr s12x4 two(2.0f);
145 constexpr s12x4 three(3.0f);
146 s12x4 t = clamp((x - edge0) / (edge1 - edge0), zero, one);
147 return t * t * (three - two * t);
148 }
static constexpr FASTLED_FORCE_INLINE s12x4 clamp(s12x4 x, s12x4 lo, s12x4 hi) FL_NOEXCEPT
Definition s12x4.h:133
constexpr s12x4() FL_NOEXCEPT=default

References s12x4(), clamp(), FASTLED_FORCE_INLINE, FL_NOEXCEPT, fl::t, and fl::x.

+ Here is the call graph for this function: