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

◆ smoothstep()

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

Definition at line 166 of file u16x16.h.

166 {
167 constexpr u16x16 zero(0.0f);
168 constexpr u16x16 one(1.0f);
169 constexpr u16x16 two(2.0f);
170 constexpr u16x16 three(3.0f);
171 u16x16 t = clamp((x - edge0) / (edge1 - edge0), zero, one);
172 return t * t * (three - two * t);
173 }
constexpr u16x16() FL_NOEXCEPT=default
static constexpr FASTLED_FORCE_INLINE u16x16 clamp(u16x16 x, u16x16 lo, u16x16 hi) FL_NOEXCEPT
Definition u16x16.h:150

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

+ Here is the call graph for this function: