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 15 of file xymap.h.

16 {
17 (void)height;
18 if (y & 1) // Even or odd row?
19 // reverse every second line for a serpentine lled layout
20 return (y + 1) * width - 1 - x;
21 else
22 return y * width + x;
23}
u8 u8 height
Definition blur.h:186
u8 width
Definition blur.h:186

References FASTLED_FORCE_INLINE, FL_NOEXCEPT, height, width, x, and y.

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

+ Here is the caller graph for this function: