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

◆ smoothstep()

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

Definition at line 151 of file s24x8.h.

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

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

+ Here is the call graph for this function: