Comments from Jim Roseborough. 1. Fix the tolerance on the rotation matrix conversion test. 2. Fix some out of date comments. Change-Id: I65e80da1f96d7b4d9ac0630ad8cb708c41739840
diff --git a/include/ceres/rotation.h b/include/ceres/rotation.h index 397787d..e3dbfe8 100644 --- a/include/ceres/rotation.h +++ b/include/ceres/rotation.h
@@ -417,7 +417,7 @@ R(1, 2) = -wx*sintheta + wy*wz*(kOne - costheta); R(2, 2) = costheta + wz*wz*(kOne - costheta); } else { - // At zero, we switch to using the first order Taylor expansion. + // Near zero, we switch to using the first order Taylor expansion. R(0, 0) = kOne; R(1, 0) = angle_axis[2]; R(2, 0) = -angle_axis[1]; @@ -625,7 +625,7 @@ // and actually performing multiplication with the point pt, gives us // R * pt = pt + w x pt. // - // Switching to the Taylor expansion at zero provides meaningful + // Switching to the Taylor expansion near zero provides meaningful // derivatives when evaluated using Jets. // // Explicitly inlined evaluation of the cross product for
diff --git a/internal/ceres/rotation_test.cc b/internal/ceres/rotation_test.cc index cc4cc92..42fdfee 100644 --- a/internal/ceres/rotation_test.cc +++ b/internal/ceres/rotation_test.cc
@@ -576,7 +576,7 @@ RotationMatrixToAngleAxis(matrix, round_trip); for (int i = 0; i < 3; ++i) { - EXPECT_NEAR(round_trip[i], axis_angle[i], kTolerance); + EXPECT_NEAR(round_trip[i], axis_angle[i], std::numeric_limits<double>::epsilon()); } } }