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

◆ at_no_wrap()

vec2f fl::Corkscrew::at_no_wrap ( fl::u16 i) const

Definition at line 98 of file corkscrew.cpp.

98 {
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
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 = fmodf(position.x, static_cast<float>(mState.width));
117
118 return position;
119}
fl::u16 mWidth
Definition corkscrew.h:235
fl::u16 mNumLeds
Definition corkscrew.h:230
float mTotalTurns
Definition corkscrew.h:229
fl::u16 mHeight
Definition corkscrew.h:236
vec2f calculateLedPositionExtended(fl::u16 ledIndex, fl::u16 numLeds, float totalTurns, const Gap &gapParams, fl::u16 width, fl::u16 height)
Definition corkscrew.cpp:25
vec2< float > vec2f
Definition geometry.h:333

References mGapParams, mHeight, mNumLeds, mTotalTurns, and mWidth.

Referenced by at_exact(), at_splat_extrapolate(), draw(), and readFrom().

+ Here is the caller graph for this function: