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

◆ xy_serpentine()

FASTLED_FORCE_INLINE u16 fl::xy_serpentine ( u16 x,
u16 y,
u16 width,
u16 height )

Definition at line 19 of file xymap.h.

20 {
21 (void)height;
22 if (y & 1) // Even or odd row?
23 // reverse every second line for a serpentine lled layout
24 return (y + 1) * width - 1 - x;
25 else
26 return y * width + x;
27}
int y
Definition simple.h:93
int x
Definition simple.h:92

References FASTLED_FORCE_INLINE, x, and y.

Referenced by fl::XYMap::mapToIndex().

+ Here is the caller graph for this function: