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

◆ smoothstep()

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

Definition at line 155 of file u8x8.h.

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

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

+ Here is the call graph for this function: