Fix stream operator for coordinate

This commit is contained in:
Patrick Niklaus 2016-02-24 21:31:16 +01:00
parent 5acd2ca394
commit 2e214ac222

View File

@ -9,6 +9,7 @@
#include <bitset> #include <bitset>
#endif #endif
#include <iostream> #include <iostream>
#include <iomanip>
#include <limits> #include <limits>
namespace osrm namespace osrm
@ -61,7 +62,8 @@ bool operator!=(const Coordinate lhs, const Coordinate rhs) { return !(lhs == rh
std::ostream &operator<<(std::ostream &out, const Coordinate coordinate) std::ostream &operator<<(std::ostream &out, const Coordinate coordinate)
{ {
out << "(lon:" << toFloating(coordinate.lon) << ", lat:" << toFloating(coordinate.lat) << ")"; out << std::setprecision(12) << "(lon:" << toFloating(coordinate.lon)
<< ", lat:" << toFloating(coordinate.lat) << ")";
return out; return out;
} }
} }