| 96 | |
| 97 | |
| 98 | vec2f Corkscrew::at_no_wrap(fl::u16 i) const { |
| 99 | if (i >= mNumLeds) { |
| 100 | // Handle out-of-bounds access, possibly by returning a default value |
| 101 | return vec2f(0, 0); |
| 102 | } |
| 103 | |
| 104 | // Compute position on-the-fly |
| 105 | vec2f position = calculateLedPositionExtended(i, mNumLeds, mTotalTurns, |
| 106 | mGapParams, mWidth, mHeight); |
| 107 | |
| 108 | // // Apply inversion if requested |
| 109 | // if (mInvert) { |
| 110 | // fl::u16 invertedIndex = mNumLeds - 1 - i; |
| 111 | // position = calculateLedPositionExtended(invertedIndex, mNumLeds, mTotalTurns, |
| 112 | // mGapParams, mState.width, mState.height); |
| 113 | // } |
| 114 | |
| 115 | // now wrap the x-position |
| 116 | //position.x = fl::fmodf(position.x, static_cast<float>(mState.width)); |
| 117 | |
| 118 | return position; |
| 119 | } |
| 120 | |
| 121 | vec2f Corkscrew::at_exact(fl::u16 i) const { |
| 122 | // Get the unwrapped position |
no test coverage detected