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

◆ mapToIndex() [1/2]

uint16_t fl::XYMap::mapToIndex ( int x,
int y ) const
inline

Definition at line 77 of file xymap.h.

77 {
78 if (x < 0) {
79 x = 0;
80 } else if (uint16_t(x) >= width) {
81 x = width - 1;
82 }
83 if (y < 0) {
84 y = 0;
85 } else if (uint16_t(y) >= height) {
86 y = height - 1;
87 }
88 return mapToIndex((uint16_t)x, (uint16_t)y);
89 }
uint32_t x[NUM_LAYERS]
Definition Fire2023.ino:80
uint32_t y[NUM_LAYERS]
Definition Fire2023.ino:81
uint16_t width
Definition xymap.h:100
uint16_t mapToIndex(uint16_t x, uint16_t y) const
Definition xymap.cpp:96
uint16_t height
Definition xymap.h:101

References height, mapToIndex(), width, x, and y.

+ Here is the call graph for this function: