FastLED 3.10.6
Loading...
Searching...
No Matches

◆ smoothstepf()

float mood_ring::smoothstepf ( float e0,
float e1,
float x )

0 below e0, 1 above e1, smooth in between.

Definition at line 20 of file ring_canvas.cpp.

20 {
21 if (e1 <= e0)
22 return x >= e1 ? 1.0f : 0.0f;
23 float t = clampf((x - e0) / (e1 - e0), 0.0f, 1.0f);
24 return t * t * (3.0f - 2.0f * t);
25}
int x
Definition simple.h:92
static uint32_t t
Definition Luminova.h:55
float clampf(float v, float lo, float hi)
Definition ring_canvas.h:19

References clampf(), t, and x.

Referenced by mood_ring::RoomListener::blendFrom(), mood_ring::MoodPainter::drawPulses(), mood_ring::anonymous_namespace{layers.cpp}::grainEnvelope(), and mood_ring::GrooveLayer::render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: