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

◆ operator[]() [1/2]

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

Definition at line 410 of file screenmap.cpp.

410 {
411 if (x >= length || !mLookUpTable) {
412 return const_cast<vec2f &>(empty()); // better than crashing.
413 }
414 LUTXYFLOAT &lut = *mLookUpTable.get();
415 auto *data = lut.getDataMutable();
416 return data[x];
417}
int x
Definition simple.h:92
static const vec2f & empty()
LUTXYFLOATPtr mLookUpTable
Definition screenmap.h:103
LUT< vec2f > LUTXYFLOAT
Definition lut.h:26
vec2< float > vec2f
Definition geometry.h:333

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

+ Here is the call graph for this function: