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

◆ smoothstep()

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

Definition at line 166 of file u12x4.h.

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

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

+ Here is the call graph for this function: