| 159 | |
| 160 | |
| 161 | Tile2x2_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 | |
| 177 | Tile2x2_u8_wrap Corkscrew::calculateTileAtWrap(float i) const { |
| 178 | // This is a splatted pixel, but wrapped around the cylinder. |
no test coverage detected