From 711535e81854dc7e9161ebfe916d4b5fe63ac65a Mon Sep 17 00:00:00 2001 From: Richard Roberts Date: Wed, 9 Nov 2011 03:33:13 +0000 Subject: [PATCH] Added missing header and reverted debugging change from quaternion merge --- gtsam/geometry/Makefile.am | 3 ++- gtsam/geometry/Rot3M.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gtsam/geometry/Makefile.am b/gtsam/geometry/Makefile.am index befeef3ec..42a325971 100644 --- a/gtsam/geometry/Makefile.am +++ b/gtsam/geometry/Makefile.am @@ -14,7 +14,8 @@ check_PROGRAMS = headers += concepts.h # Points and poses -sources += Point2.cpp Rot2.cpp Pose2.cpp Point3.cpp Rot3M.cpp Rot3Q.cpp Pose3.cpp +sources += Point2.cpp Rot2.cpp Pose2.cpp Point3.cpp Rot3M.cpp Rot3Q.cpp Pose3.cpp +headers += Rot3.h check_PROGRAMS += tests/testPoint2 tests/testRot2 tests/testPose2 tests/testPoint3 tests/testRot3M tests/testRot3Q tests/testPose3 # Cameras diff --git a/gtsam/geometry/Rot3M.cpp b/gtsam/geometry/Rot3M.cpp index 86ed82d63..928b9b450 100644 --- a/gtsam/geometry/Rot3M.cpp +++ b/gtsam/geometry/Rot3M.cpp @@ -170,7 +170,7 @@ namespace gtsam { R.r2().z()-R.r3().y(), R.r3().x()-R.r1().z(), R.r1().y()-R.r2().x()); - } else if (fabs(tr) - -1.0 < 1e-10) { // when theta = +-pi, +-3pi, +-5pi, etc. + } else if (fabs(tr - -1.0) < 1e-10) { // when theta = +-pi, +-3pi, +-5pi, etc. if(fabs(R.r3().z() - -1.0) > 1e-10) 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());