1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-10 00:36:40 +02:00

refactor: use norm

This commit is contained in:
Justin Lin
2022-04-12 09:33:54 +08:00
parent 2a29844a3f
commit 903caed63c

View File

@@ -3,5 +3,5 @@ function angle_between_ccw_2d(v1, v2) =
a >= 0 ? a : a + 360;
function angle_between_ccw_3d(v1, v2) =
let(a = acos(v1 * v2 / sqrt((v1 * v1) * (v2 * v2))))
let(a = acos(v1 * v2 / (norm(v1) * norm(v2))))
a >= 0 ? a : a + 360;