FastLED 3.10.8
Loading...
Searching...
No Matches

◆ smoothstep()

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

Definition at line 175 of file u16x16.h.

175 {
176 constexpr u16x16 zero(0.0f);
177 constexpr u16x16 one(1.0f);
178 constexpr u16x16 two(2.0f);
179 constexpr u16x16 three(3.0f);
180 u16x16 t = clamp((x - edge0) / (edge1 - edge0), zero, one);
181 return t * t * (three - two * t);
182 }
static constexpr FASTLED_FORCE_INLINE u16x16 clamp(u16x16 x, u16x16 lo, u16x16 hi) FL_NO_EXCEPT
Definition u16x16.h:159
constexpr u16x16() FL_NO_EXCEPT=default

References u16x16(), clamp(), FASTLED_FORCE_INLINE, fl::FL_NO_EXCEPT, fl::t, and fl::x.

+ Here is the call graph for this function: