From 3027464a66505cefe10ade1d83466c582a2c3ae8 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Sun, 2 Nov 2025 20:12:59 +0000 Subject: rect: add from_cwh alias for from_centre_dims --- rect.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/rect.lua b/rect.lua index 827489b..0a1b79c 100644 --- a/rect.lua +++ b/rect.lua @@ -44,6 +44,7 @@ function Rect.from_centre_dims(cls, centre, width, hight) w=width, h=hight, }, cls) end +Rect.from_cwh = Rect.from_centre_dims function Rect.has(self, point) return self.x0 <= point.x and point.x <= self.x1 -- cgit v1.2.3