FastLED 3.10.6
Loading...
Searching...
No Matches

◆ operator[]() [2/2]

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

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

698 {
699 if (x >= length || !mLookUpTable) {
700 return const_cast<vec2f &>(empty()); // better than crashing.
701 }
702 LUTXYFLOAT &lut = *mLookUpTable.get();
703 auto *data = lut.getDataMutable();
704 return data[x];
705}
LUTXYFLOATPtr mLookUpTable
Definition screenmap.h:143
static const vec2f & empty() FL_NO_EXCEPT
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: