FastLED 3.9.15
Loading...
Searching...
No Matches

◆ XY() [1/2]

fl::u16 fl::XY ( fl::u16 x,
fl::u16 y )

Definition at line 27 of file Luminova.h.

27 {
28 if (x >= WIDTH || y >= HEIGHT)
29 return 0;
31 if (y & 1) {
32 // odd rows run right-to-left
33 return y * WIDTH + (WIDTH - 1 - x);
34 } else {
35 // even rows run left-to-right
36 return y * WIDTH + x;
37 }
38 } else {
39 return y * WIDTH + x;
40 }
41}
int y
Definition simple.h:93
int x
Definition simple.h:92
#define kMatrixSerpentineLayout
#define WIDTH
Definition advanced.h:36
#define HEIGHT
Definition advanced.h:37

References HEIGHT, kMatrixSerpentineLayout, WIDTH, x, and y.