diff --git a/gtsam/geometry/Point2.cpp b/gtsam/geometry/Point2.cpp index e188b2930..27a962e70 100644 --- a/gtsam/geometry/Point2.cpp +++ b/gtsam/geometry/Point2.cpp @@ -27,7 +27,7 @@ INSTANTIATE_LIE(Point2); /* ************************************************************************* */ void Point2::print(const string& s) const { - cout << s << "(" << x_ << ", " << y_ << ")" << endl; + cout << s << *this << endl; } /* ************************************************************************* */ diff --git a/gtsam/geometry/Point3.cpp b/gtsam/geometry/Point3.cpp index c8ee78565..df31f0803 100644 --- a/gtsam/geometry/Point3.cpp +++ b/gtsam/geometry/Point3.cpp @@ -32,7 +32,7 @@ bool Point3::equals(const Point3 & q, double tol) const { /* ************************************************************************* */ void Point3::print(const string& s) const { - cout << s << "(" << x_ << ", " << y_ << ", " << z_ << ")" << endl; + cout << s << *this << endl; } /* ************************************************************************* */