Add region.check function

wip
copygirl 1 year ago
parent e4d4bacc89
commit b9124e796c
  1. 8
      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)

Loading…
Cancel
Save