mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-24 08:03:46 +01:00
16 lines
347 B
Lua
16 lines
347 B
Lua
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
|
|
|
|
function worldeditadditions.vector.floor(v)
|
|
v.x = math.floor(v.x)
|
|
v.y = math.floor(v.y)
|
|
v.z = math.floor(v.z)
|
|
end
|