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

◆ smoothstep()

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

Definition at line 152 of file s4x12.h.

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

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

+ Here is the call graph for this function: