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

◆ xy_serpentine()

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

Definition at line 16 of file xymap.h.

17 {
18 (void)height;
19 if (y & 1) // Even or odd row?
20 // reverse every second line for a serpentine lled layout
21 return (y + 1) * width - 1 - x;
22 else
23 return y * width + x;
24}
uint32_t x[NUM_LAYERS]
Definition Fire2023.ino:80
uint32_t y[NUM_LAYERS]
Definition Fire2023.ino:81

References FASTLED_FORCE_INLINE, x, and y.

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

+ Here is the caller graph for this function: