From 8cd9ec2e98d27b414bc7cff3a5a98b0aad9099ce Mon Sep 17 00:00:00 2001 From: Elizabeth Alexander Hunt Date: Thu, 14 May 2026 09:09:08 -0700 Subject: Fixes crash on equip --- math.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'math.lua') diff --git a/math.lua b/math.lua index dc5ba64..429e1ab 100644 --- a/math.lua +++ b/math.lua @@ -14,6 +14,10 @@ Vec2.__div = function(a, b) end Vec2.__tostring = function(a) return "(" .. fmt(a.x) .. "," .. fmt(a.y) .. ")" end +function Vec2:in_bounds(low, hi) + return self.x >= low.x and self.x <= hi.x and self.y >= low.y and self.y <= hi.y +end + function Vec2:magnitude() return sqrt(self.x * self.x + self.y * self.y) end -- cgit v1.3