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

◆ at_wrap()

Tile2x2_u8_wrap fl::Corkscrew::at_wrap ( float i) const

Definition at line 161 of file corkscrew.cpp.

161 {
162 if (mCachingEnabled) {
163 // Use cache if enabled
165
166 // Convert float index to integer for cache lookup
167 fl::size cache_index = static_cast<fl::size>(i);
168 if (cache_index < mTileCache.size()) {
169 return mTileCache[cache_index];
170 }
171 }
172
173 // Fall back to dynamic calculation if cache disabled or index out of bounds
174 return calculateTileAtWrap(i);
175}
Tile2x2_u8_wrap calculateTileAtWrap(float i) const
fl::vector< Tile2x2_u8_wrap > mTileCache
Definition corkscrew.h:246
void initializeCache() const
bool mCachingEnabled
Definition corkscrew.h:248

References calculateTileAtWrap(), initializeCache(), mCachingEnabled, and mTileCache.

Referenced by draw(), and readFromMulti().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: