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

◆ falloff()

float mood_ring::falloff ( float distance,
float sigma )

Smooth bump: 1 at distance 0, 0 at distance >= sigma.

Definition at line 49 of file ring_canvas.cpp.

49 {
50 if (sigma <= 0.0f)
51 return 0.0f;
52 float t = 1.0f - distance / sigma;
53 if (t <= 0.0f)
54 return 0.0f;
55 if (t >= 1.0f)
56 return 1.0f;
57 return t * t * (3.0f - 2.0f * t);
58}
static uint32_t t
Definition Luminova.h:55

References t.

Referenced by mood_ring::RingCanvas::lobe(), and mood_ring::RingCanvas::ring().

+ Here is the caller graph for this function: