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

◆ smoothstep()

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

Definition at line 153 of file u24x8.h.

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

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

+ Here is the call graph for this function: