From 92d705e25b0759cadd1b00832a1f3061742cfb81 Mon Sep 17 00:00:00 2001 From: Richard Roberts Date: Sat, 10 Jul 2010 20:58:32 +0000 Subject: [PATCH] Fixed compiler warnings --- cpp/Rot3.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpp/Rot3.cpp b/cpp/Rot3.cpp index 12e9ff9ef..c1f53ff7a 100644 --- a/cpp/Rot3.cpp +++ b/cpp/Rot3.cpp @@ -115,16 +115,16 @@ namespace gtsam { // Log map at identity - return the canonical coordinates of this rotation inline Vector logmap(const Rot3& R) { double tr = R.r1().x()+R.r2().y()+R.r3().z(); - if (fabs(tr-3.0) < 1e-10) // when theta = 0, +-2pi, +-4pi, etc. + if (fabs(tr-3.0) < 1e-10) { // when theta = 0, +-2pi, +-4pi, etc. return zero(3); - else if (tr==-1.0) { // when theta = +-pi, +-3pi, +-5pi, etc. + } else if (tr==-1.0) { // when theta = +-pi, +-3pi, +-5pi, etc. if(R.r3().z() != -1.0) return (boost::math::constants::pi() / sqrt(2.0+2.0*R.r3().z())) * Vector_(3, R.r3().x(), R.r3().y(), 1.0+R.r3().z()); else if(R.r2().y() != -1.0) return (boost::math::constants::pi() / sqrt(2.0+2.0*R.r2().y())) * Vector_(3, R.r2().x(), 1.0+R.r2().y(), R.r2().z()); - else if(R.r1().x() != -1.0) + else // if(R.r1().x() != -1.0) TODO: fix this? return (boost::math::constants::pi() / sqrt(2.0+2.0*R.r1().x())) * Vector_(3, 1.0+R.r1().x(), R.r1().y(), R.r1().z()); } else {