mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-23 23:53:44 +01:00
round mtrig values
This commit is contained in:
parent
3f6b8f4d21
commit
9d2a0ca23c
@ -17,7 +17,7 @@ worldedit.register_command("mtrig", {
|
||||
local str = "The measurements of the line pos1,pos2 are Length (D): "
|
||||
local vec = v3.subtract(worldedit.pos2[name],worldedit.pos1[name]):abs()
|
||||
local len = vec:length()
|
||||
str = str..len..", ∠XZ: "..math.deg(math.atan(vec.z/vec.x)).."° ∠DY: "..math.deg(math.asin(vec.y/len)).."°"
|
||||
str = str..wea.round(len, 4)..", ∠XZ: "..wea.round(math.deg(math.atan(vec.z/vec.x)), 4).."°, ∠DY: "..wea.round(math.deg(math.asin(vec.y/len)), 4).."°"
|
||||
return true, str
|
||||
end,
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user