mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-13 10:14:41 +02:00
refactor
This commit is contained in:
@@ -3,10 +3,5 @@ function angle_between_ccw_2d(v1, v2) =
|
||||
a >= 0 ? a : a + 360;
|
||||
|
||||
function angle_between_ccw_3d(v1, v2) =
|
||||
let(
|
||||
dot = v1 * v2,
|
||||
lenSq1 = v1.x ^ 2 + v1.y ^ 2 + v1.z ^ 2,
|
||||
lenSq2 = v2.x ^ 2 + v2.y ^ 2 + v2.z ^ 2,
|
||||
a = acos(dot / sqrt(lenSq1 * lenSq2))
|
||||
)
|
||||
let(a = acos(v1 * v2 / sqrt((v1 * v1) * (v2 * v2))))
|
||||
a >= 0 ? a : a + 360;
|
Reference in New Issue
Block a user