MCPcopy Create free account
hub / github.com/FastLED/FastLED / at_wrap

Method at_wrap

src/fl/gfx/corkscrew.cpp.hpp:161–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159
160
161Tile2x2_u8_wrap Corkscrew::at_wrap(float i) const {
162 if (mCachingEnabled) {
163 // Use cache if enabled
164 initializeCache();
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}
176
177Tile2x2_u8_wrap Corkscrew::calculateTileAtWrap(float i) const {
178 // This is a splatted pixel, but wrapped around the cylinder.

Callers 3

FL_TEST_FILEFunction · 0.80
drawFunction · 0.80
loopFunction · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected