Changed haversine formula to be less sensitive to floating-point

inexactness.
This commit is contained in:
DennisOSRM
2012-10-04 17:27:17 +02:00
parent c6dc476704
commit 0b2df9892d
2 changed files with 40 additions and 13 deletions
+1 -1
View File
@@ -51,7 +51,7 @@ public:
unsigned startName;
unsigned destName;
_RouteSummary() : lengthString("0"), durationString("0"), startName(0), destName(0) {}
void BuildDurationAndLengthStrings(double distance, unsigned time) {
void BuildDurationAndLengthStrings(const double distance, const unsigned time) {
//compute distance/duration for route summary
std::ostringstream s;
s << round(distance);