From e82c6ec91232f8b39265d3701c1eda9d245ded57 Mon Sep 17 00:00:00 2001 From: Michael Kirsch Date: Sat, 6 Jul 2019 02:16:36 +0200 Subject: [PATCH] all is double now, and clarifying comment --- xs/src/libslic3r/TransformationMatrix.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/xs/src/libslic3r/TransformationMatrix.cpp b/xs/src/libslic3r/TransformationMatrix.cpp index 653e54d93..155b77759 100644 --- a/xs/src/libslic3r/TransformationMatrix.cpp +++ b/xs/src/libslic3r/TransformationMatrix.cpp @@ -277,8 +277,6 @@ TransformationMatrix TransformationMatrix::mat_rotation(double angle_rad, const TransformationMatrix TransformationMatrix::mat_rotation(Vectorf3 origin, Vectorf3 target) { - // TODO: there is a lot of float <-> double conversion going on here - TransformationMatrix mat; double length_sq = origin.x*origin.x + origin.y*origin.y + origin.z*origin.z; double rec_length; @@ -333,7 +331,7 @@ TransformationMatrix TransformationMatrix::mat_rotation(Vectorf3 origin, Vectorf } } else - {// not colinear, cross represents rotation axis so that angle is positive + {// not colinear, cross represents rotation axis so that angle is (0, 180) // dot's vectors have previously been normalized, so nothing to do except arccos double angle = acos(dot);