From af8241505fbaf300e22daaf66c19d8a38e74ca0e Mon Sep 17 00:00:00 2001 From: Djeeberjr Date: Sat, 4 Feb 2023 20:43:39 +0100 Subject: [PATCH] added getHight and getWidth to Rect --- src/lib/Rect.hx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lib/Rect.hx b/src/lib/Rect.hx index 24ca205..0047167 100644 --- a/src/lib/Rect.hx +++ b/src/lib/Rect.hx @@ -28,4 +28,12 @@ class Rect { public function isOutside(p: Pos): Bool { return !this.isInside(p); } + + public function getHight(): Int { + return tr.y - bl.y; + } + + public function getWidth(): Int { + return tr.x - bl.x; + } }