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

◆ smoothstep()

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

Definition at line 153 of file u4x12.h.

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

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

+ Here is the call graph for this function: