MCPcopy Create free account
hub / github.com/FastLED/FastLED / XY

Function XY

examples/Luminova/Luminova.h:28–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26// properly.
27namespace fl {
28fl::u16 XY(fl::u16 x, fl::u16 y) {
29 if (x >= WIDTH || y >= HEIGHT)
30 return 0;
31 if (kMatrixSerpentineLayout) {
32 if (y & 1) {
33 // odd rows run right-to-left
34 return y * WIDTH + (WIDTH - 1 - x);
35 } else {
36 // even rows run left-to-right
37 return y * WIDTH + x;
38 }
39 } else {
40 return y * WIDTH + x;
41 }
42}
43} // namespace fl
44
45// ===== particle sim (Processing port) =====

Callers 2

plotDotFunction · 0.70
xy_map_functionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected