Fixed Jet to integer comparison. Thanks to Keith Leung for reporting this. Change-Id: I97c2eb87a5cf6779779e659aaa716dc507824def
diff --git a/include/ceres/rotation.h b/include/ceres/rotation.h index 6c0d58e..16bfc8a 100644 --- a/include/ceres/rotation.h +++ b/include/ceres/rotation.h
@@ -252,7 +252,7 @@ // Case 2: theta ~ 0, means sin(theta) ~ theta to a good // approximation. - if (costheta > 0) { + if (costheta > 0.0) { const T kHalf = T(0.5); for (int i = 0; i < 3; ++i) { angle_axis[i] *= kHalf; @@ -277,8 +277,8 @@ // angle_axis[i] should be positive, otherwise negative. for (int i = 0; i < 3; ++i) { angle_axis[i] = theta * sqrt((R[i*4] - costheta) * inv_one_minus_costheta); - if (((sintheta < 0) && (angle_axis[i] > 0)) || - ((sintheta > 0) && (angle_axis[i] < 0))) { + if (((sintheta < 0.0) && (angle_axis[i] > 0.0)) || + ((sintheta > 0.0) && (angle_axis[i] < 0.0))) { angle_axis[i] = -angle_axis[i]; } }