all is double now, and clarifying comment

This commit is contained in:
Michael Kirsch 2019-07-06 02:16:36 +02:00 committed by Joseph Lenox
parent ea8a8eef2b
commit e82c6ec912

View File

@ -277,8 +277,6 @@ TransformationMatrix TransformationMatrix::mat_rotation(double angle_rad, const
TransformationMatrix TransformationMatrix::mat_rotation(Vectorf3 origin, Vectorf3 target) TransformationMatrix TransformationMatrix::mat_rotation(Vectorf3 origin, Vectorf3 target)
{ {
// TODO: there is a lot of float <-> double conversion going on here
TransformationMatrix mat; TransformationMatrix mat;
double length_sq = origin.x*origin.x + origin.y*origin.y + origin.z*origin.z; double length_sq = origin.x*origin.x + origin.y*origin.y + origin.z*origin.z;
double rec_length; double rec_length;
@ -333,7 +331,7 @@ TransformationMatrix TransformationMatrix::mat_rotation(Vectorf3 origin, Vectorf
} }
} }
else 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 // dot's vectors have previously been normalized, so nothing to do except arccos
double angle = acos(dot); double angle = acos(dot);