From a552ba4539a762613a05ca162274b181fce2d07e Mon Sep 17 00:00:00 2001 From: Frank Dellaert Date: Thu, 14 Jan 2010 05:59:33 +0000 Subject: [PATCH] Comments/formatting only --- cpp/BearingFactor.h | 4 +--- cpp/testBearingFactor.cpp | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/cpp/BearingFactor.h b/cpp/BearingFactor.h index 67fb829f4..85478baea 100644 --- a/cpp/BearingFactor.h +++ b/cpp/BearingFactor.h @@ -27,9 +27,7 @@ namespace gtsam { * Calculate relative bearing and optional derivative */ Rot2 relativeBearing(const Point2& d, boost::optional H) { - double x = d.x(), y = d.y(); - double d2 = x * x + y * y; - double n = sqrt(d2); + double x = d.x(), y = d.y(), d2 = x * x + y * y, n = sqrt(d2); if (H) *H = Matrix_(1, 2, -y / d2, x / d2); return Rot2(x / n, y / n); } diff --git a/cpp/testBearingFactor.cpp b/cpp/testBearingFactor.cpp index cec069e72..5cad23cd1 100644 --- a/cpp/testBearingFactor.cpp +++ b/cpp/testBearingFactor.cpp @@ -1,12 +1,11 @@ /** * @file testBearingFactor.cpp * @brief Unit tests for BearingFactor Class - * @authors Frank Dellaert, Viorela Ila + * @authors Frank Dellaert **/ -#include #include -#include "Key.h" + #include "numericalDerivative.h" #include "BearingFactor.h" #include "TupleConfig.h"