From 9117b45899b569182b87eee5eec9921d91ac3323 Mon Sep 17 00:00:00 2001 From: Dennis Luxen Date: Wed, 21 May 2014 10:03:30 +0200 Subject: [PATCH] move more distance calculations to float --- DataStructures/StaticRTree.h | 4 ++-- Include/osrm/Coordinate.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DataStructures/StaticRTree.h b/DataStructures/StaticRTree.h index f30d53289..b3135f0c1 100644 --- a/DataStructures/StaticRTree.h +++ b/DataStructures/StaticRTree.h @@ -152,9 +152,9 @@ class StaticRTree return min_dist; } - inline double GetMinMaxDist(const FixedPointCoordinate &location) const + inline float GetMinMaxDist(const FixedPointCoordinate &location) const { - double min_max_dist = std::numeric_limits::max(); + float min_max_dist = std::numeric_limits::max(); // Get minmax distance to each of the four sides FixedPointCoordinate upper_left(max_lat, min_lon); FixedPointCoordinate upper_right(max_lat, max_lon); diff --git a/Include/osrm/Coordinate.h b/Include/osrm/Coordinate.h index ebdb2a7b0..b1823f9e2 100644 --- a/Include/osrm/Coordinate.h +++ b/Include/osrm/Coordinate.h @@ -49,13 +49,13 @@ struct FixedPointCoordinate static double ApproximateDistance(const int lat1, const int lon1, const int lat2, const int lon2); - static float ApproximateDistance(const FixedPointCoordinate &c1, + static double ApproximateDistance(const FixedPointCoordinate &c1, const FixedPointCoordinate &c2); static float ApproximateEuclideanDistance(const FixedPointCoordinate &c1, const FixedPointCoordinate &c2); - static double + static float ApproximateEuclideanDistance(const int lat1, const int lon1, const int lat2, const int lon2); static void convertInternalLatLonToString(const int value, std::string &output);