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

◆ at_wrap()

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

Definition at line 160 of file corkscrew.cpp.hpp.

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

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: