mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-22 23:42:59 +00:00
Update mtrig.lua
This commit is contained in:
parent
9d2a0ca23c
commit
428ec12918
1 changed files with 3 additions and 1 deletions
|
@ -17,7 +17,9 @@ worldedit.register_command("mtrig", {
|
||||||
local str = "The measurements of the line pos1,pos2 are Length (D): "
|
local str = "The measurements of the line pos1,pos2 are Length (D): "
|
||||||
local vec = v3.subtract(worldedit.pos2[name],worldedit.pos1[name]):abs()
|
local vec = v3.subtract(worldedit.pos2[name],worldedit.pos1[name]):abs()
|
||||||
local len = vec:length()
|
local len = vec:length()
|
||||||
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).."°"
|
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
|
return true, str
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue