From 658a7409557f77ad021d63d9118be817c348d767 Mon Sep 17 00:00:00 2001 From: Niel Lebeck Date: Mon, 10 Jun 2024 18:22:12 -0700 Subject: [PATCH] Remove the unused `Rectangle::ClampLL` function Also tweak the documentation of `ClampUL`, now that there's no accompanying `ClampLL`. --- Source/Core/Common/MathUtil.h | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/Source/Core/Common/MathUtil.h b/Source/Core/Common/MathUtil.h index 1494a894d9..d21ddd95c9 100644 --- a/Source/Core/Common/MathUtil.h +++ b/Source/Core/Common/MathUtil.h @@ -112,18 +112,12 @@ struct Rectangle constexpr T GetWidth() const { return GetDistance(left, right); } constexpr T GetHeight() const { return GetDistance(top, bottom); } - // If the rectangle is in a coordinate system with a lower-left origin, use - // this Clamp. - void ClampLL(T x1, T y1, T x2, T y2) - { - left = std::clamp(left, x1, x2); - right = std::clamp(right, x1, x2); - top = std::clamp(top, y2, y1); - bottom = std::clamp(bottom, y2, y1); - } - // If the rectangle is in a coordinate system with an upper-left origin, - // use this Clamp. + // Clamp this rectangle to the given rectangle, specified as coordinates in + // a coordinate system with an upper-left origin. + // + // REQUIRES: x1 <= x2 + // REQUIRES: y1 <= y2 void ClampUL(T x1, T y1, T x2, T y2) { left = std::clamp(left, x1, x2);