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

◆ operator[]() [1/2]

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

Definition at line 255 of file screenmap.cpp.

255 {
256 if (x >= length || !mLookUpTable) {
257 return const_cast<vec2f &>(empty()); // better than crashing.
258 }
259 LUTXYFLOAT &lut = *mLookUpTable.get();
260 auto *data = lut.getDataMutable();
261 return data[x];
262}
int x
Definition Audio.ino:71
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:301

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

+ Here is the call graph for this function: