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

◆ getLocalCoord()

template<typename T>
vec2< int32_t > fl::MatrixSlice< T >::getLocalCoord ( int32_t x_world,
int32_t y_world ) const
inline

Definition at line 167 of file slice.h.

167 {
168 // clamp to [mBottomLeft, mTopRight]
171 // convert to local
172 return {x_clamped - mBottomLeft.x, y_clamped - mBottomLeft.y};
173 }
vec2< int32_t > mBottomLeft
Definition slice.h:198
vec2< int32_t > mTopRight
Definition slice.h:199
FASTLED_FORCE_INLINE T clamp(T value, T min, T max)
Definition clamp.h:10

References fl::clamp(), mBottomLeft, and mTopRight.

+ Here is the call graph for this function: