1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-27 08:25:45 +02:00
This commit is contained in:
Justin Lin
2022-03-10 20:24:01 +08:00
parent 20242f5d51
commit 58f26d8e0f

View File

@@ -1,10 +1,6 @@
function __angy_angz(p1, p2) =
let(
dx = p2.x - p1.x,
dy = p2.y - p1.y,
dz = p2.z - p1.z
)
let(v = p2 - p1)
[
atan2(dz, sqrt(dx ^ 2 + dy ^ 2)),
atan2(dy, dx)
atan2(v.z, sqrt(v.x ^ 2 + v.y ^ 2)),
atan2(v.y, v.x)
];