Definition at line 21 of file screenmap.cpp.
22 {
24
25
26 float circumference = numLeds * cm_between_leds;
27 float radius = circumference / (2 *
PI);
28
29
30 float totalAngle = completion * 2 *
PI;
31 float gapAngle = 2 *
PI - totalAngle;
32
33
34 float startAngle = -
PI / 2 + gapAngle / 2.0f;
35
36
37 float divisor =
38 (completion < 1.0f && numLeds > 1) ? (numLeds - 1) : numLeds;
39
40 for (int i = 0; i < numLeds; ++i) {
41 float angle = startAngle + (i * totalAngle) / divisor;
42 float x = radius * cos(angle) * 2;
43 float y = radius * sin(angle) * 2;
45 }
46
49}
void setDiameter(float diameter)
References ScreenMap(), PI, screenMap, x, and y.
Referenced by DefaultStrip(), and setup().