apply tweaks

This commit is contained in:
Adrian Mariano
2021-12-29 17:55:29 -05:00
parent 88e0c6aa15
commit 1d72c91454
3 changed files with 14 additions and 13 deletions

View File

@@ -404,6 +404,8 @@ function affine3d_rot_from_to(from, to) =
from = unit(point3d(from)),
to = unit(point3d(to))
) approx(from,to)? affine3d_identity() :
from.z==0 && to.z==0 ? affine3d_zrot(v_theta(point2d(to)) - v_theta(point2d(from)))
:
let(
u = vector_axis(from,to),
ang = vector_angle(from,to),