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

◆ xy()

unsigned int xy ( unsigned int x,
unsigned int y )
Examples
PJRCSpectrumAnalyzer.ino.

Definition at line 79 of file PJRCSpectrumAnalyzer.ino.

79 {
80 if ((y & 1) == 0) {
81 // even numbered rows (0, 2, 4...) are left to right
82 return y * matrix_width + x;
83 } else {
84 // odd numbered rows (1, 3, 5...) are right to left
85 return y * matrix_width + matrix_width - 1 - x;
86 }
87}
uint32_t x[NUM_LAYERS]
Definition Fire2023.ino:80
uint32_t y[NUM_LAYERS]
Definition Fire2023.ino:81
const unsigned int matrix_width

References matrix_width, x, and y.

Referenced by blur2d(), anonymous_namespace{LedRopeTCL.cpp}::init_screenmap(), loop(), makeScreenMap(), fl::ScreenMap::toJson(), and wu_water().

+ Here is the caller graph for this function: