Minetest-WorldEditAdditions/worldeditadditions/utils.lua

16 lines
347 B
Lua
Raw Normal View History

2018-05-20 15:19:43 +02:00
worldeditadditions.vector = {}
function worldeditadditions.vector.tostring(v)
return "(" .. v.x ..", " .. v.y ..", " .. v.z ..")"
end
function worldeditadditions.vector.lengthsquared(v)
return v.x*v.x + v.y*v.y + v.z*v.z
end
2020-06-13 15:23:14 +02:00
function worldeditadditions.vector.floor(v)
v.x = math.floor(v.x)
v.y = math.floor(v.y)
v.z = math.floor(v.z)
end