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

◆ ringDistance()

float mood_ring::ringDistance ( float a,
float b )

Shortest distance between two ring positions, in turns, in [0, 0.5].

Definition at line 44 of file ring_canvas.cpp.

44 {
45 float d = ringOffset(a, b);
46 return d < 0.0f ? -d : d;
47}
float ringOffset(float a, float b)
Signed shortest offset from b to a on the ring, in (-0.5, 0.5].

References ringOffset().

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

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