diff --git a/region.lua b/region.lua index 290d8d4..4313100 100644 --- a/region.lua +++ b/region.lua @@ -1,5 +1,5 @@ -local math, setmetatable, vector - = math, setmetatable, vector +local math, getmetatable, setmetatable, vector + = math, getmetatable, setmetatable, vector local math_min, math_max, math_floor, math_ceil, math_round = math.min, math.max, math.floor, math.ceil, math.round @@ -134,6 +134,10 @@ function region:iter_node_positions() end end +function region:check() + return getmetatable(self) == metatable +end + function region.equals(a, b) return vector.equals(a.min, b.min) and vector.equals(a.max, b.max)