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

◆ operator[]() [1/2]

vec2f & fl::ScreenMap::operator[] ( uint32_t x)

Definition at line 262 of file screenmap.cpp.

262 {
263 if (x >= length || !mLookUpTable) {
264 return const_cast<vec2f &>(empty()); // better than crashing.
265 }
266 LUTXYFLOAT &lut = *mLookUpTable.get();
267 auto *data = lut.getDataMutable();
268 return data[x];
269}
uint32_t x[NUM_LAYERS]
Definition Fire2023.ino:82
uint32_t length
Definition screenmap.h:92
static const vec2f & empty()
LUTXYFLOATPtr mLookUpTable
Definition screenmap.h:94
LUT< vec2f > LUTXYFLOAT
Definition lut.h:25
vec2< float > vec2f
Definition geometry.h:318

References empty(), fl::LUT< T >::getDataMutable(), length, mLookUpTable, and x.

+ Here is the call graph for this function: