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

◆ smoothstep()

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

Definition at line 152 of file s8x8.h.

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

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

+ Here is the call graph for this function: