Merge pull request #3 from sbrl/master

vector.floor: add resilience
This commit is contained in:
VorTechnix 2021-03-09 11:02:09 -08:00 committed by GitHub
commit 786a9454ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -35,7 +35,7 @@ end
-- Warning: This MUTATES the given vector! -- Warning: This MUTATES the given vector!
-- @param v Vector The vector to operate on -- @param v Vector The vector to operate on
function worldeditadditions.vector.floor(v) function worldeditadditions.vector.floor(v)
v.x = math.floor(v.x) if v.x then v.x = math.floor(v.x) end
-- Some vectors are 2d, but on the x / z axes -- Some vectors are 2d, but on the x / z axes
if v.y then v.y = math.floor(v.y) end if v.y then v.y = math.floor(v.y) end
-- Some vectors are 2d -- Some vectors are 2d