Print with less precision

release/4.3a0
Frank Dellaert 2012-05-20 20:31:56 +00:00
parent edb9c17962
commit 33de8d6c00
1 changed files with 3 additions and 1 deletions

View File

@ -20,6 +20,8 @@
#include <gtsam/base/Testable.h>
#include <boost/foreach.hpp>
#include <cmath>
#include <iostream>
#include <iomanip>
using namespace std;
@ -44,7 +46,7 @@ Matrix Pose2::matrix() const {
/* ************************************************************************* */
void Pose2::print(const string& s) const {
cout << s << "(" << t_.x() << ", " << t_.y() << ", " << r_.theta() << ")" << endl;
cout << s << setprecision(2) << "(" << t_.x() << ", " << t_.y() << ", " << r_.theta() << ")" << endl;
}
/* ************************************************************************* */