Some improvements to some things.

This commit is contained in:
BenDol
2014-06-02 10:04:56 +12:00
parent a7d7667491
commit 2df51622ba
7 changed files with 34 additions and 15 deletions

View File

@@ -18,4 +18,9 @@ function Position.lessThan(pos1, pos2, orEqualTo)
else
return pos1.x < pos2.x or pos1.y < pos2.y or pos1.z < pos2.z
end
end
function Position.isInRange(pos1, pos2, minXRange, maxXRange, minYRange, maxYRange)
return (pos2.x >= pos1.x-minXRange and pos2.x <= pos1.x+maxXRange and pos2.y
>= pos1.y-minYRange and pos2.y <= pos1.y+maxYRange and pos2.z == pos1.z);
end