diff --git a/geometry/Point2.cpp b/geometry/Point2.cpp index 288b019c5..c9b225f16 100644 --- a/geometry/Point2.cpp +++ b/geometry/Point2.cpp @@ -40,7 +40,7 @@ namespace gtsam { /* ************************************************************************* */ Point2 Point2::transform_from(const Point2& point, boost::optional H1, boost::optional H2) const { - if (H1) *H1 = -eye(2); + if (H1) *H1 = eye(2); if (H2) *H2 = eye(2); return point + *this; } diff --git a/geometry/tests/testPoint2.cpp b/geometry/tests/testPoint2.cpp index c169997bc..4c8f5b11a 100644 --- a/geometry/tests/testPoint2.cpp +++ b/geometry/tests/testPoint2.cpp @@ -46,7 +46,7 @@ TEST( Point2, norm) /* ************************************************************************* */ Point2 transform_from_proxy(const Point2& pose, const Point2& point) { - return pose.transform_to(point); + return pose.transform_from(point); } /* ************************************************************************* */ @@ -54,7 +54,7 @@ Point2 transform_to_proxy(const Point2& pose, const Point2& point) { return pose.transform_to(point); } -Point2 offset(3.0, 4.0), pt(5.0, 6.0); +Point2 offset(3.0, 4.0), pt(-5.0, 6.0); /* ************************************************************************* */ TEST( Point2, transforms ) {