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

◆ operator[]() [2/2]

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

Definition at line 569 of file screenmap.cpp.hpp.

569 {
570 if (x >= length || !mLookUpTable) {
571 return const_cast<vec2f &>(empty()); // better than crashing.
572 }
573 LUTXYFLOAT &lut = *mLookUpTable.get();
574 auto *data = lut.getDataMutable();
575 return data[x];
576}
static const vec2f & empty() FL_NOEXCEPT
LUTXYFLOATPtr mLookUpTable
Definition screenmap.h:126
vec2< float > vec2f
Definition geometry.h:333
LUT< vec2f > LUTXYFLOAT
Definition lut.h:26

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

+ Here is the call graph for this function: