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

◆ getLocalCoord()

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

Definition at line 217 of file slice.h.

217 {
218 // clamp to [mBottomLeft, mTopRight]
221 // convert to local
222 return {x_clamped - mBottomLeft.x, y_clamped - mBottomLeft.y};
223 }
vec2< i32 > mBottomLeft
Definition slice.h:248
vec2< i32 > mTopRight
Definition slice.h:249
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: