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 602 of file span.h.

602 {
603 // clamp to [mBottomLeft, mTopRight]
606 // convert to local
607 return {x_clamped - mBottomLeft.x, y_clamped - mBottomLeft.y};
608 }
vec2< i32 > mBottomLeft
Definition span.h:633
vec2< i32 > mTopRight
Definition span.h:634
constexpr enable_if< is_fixed_point< T >::value, T >::type clamp(T x, T lo, T hi) FL_NOEXCEPT

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

+ Here is the call graph for this function: