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

◆ smoothstep()

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

Definition at line 151 of file s8x24.h.

151 {
152 constexpr s8x24 zero(0.0f);
153 constexpr s8x24 one(1.0f);
154 constexpr s8x24 two(2.0f);
155 constexpr s8x24 three(3.0f);
156 s8x24 t = clamp((x - edge0) / (edge1 - edge0), zero, one);
157 return t * t * (three - two * t);
158 }
constexpr s8x24() FL_NOEXCEPT=default
static constexpr FASTLED_FORCE_INLINE s8x24 clamp(s8x24 x, s8x24 lo, s8x24 hi) FL_NOEXCEPT
Definition s8x24.h:143

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

+ Here is the call graph for this function: