move more distance calculations to float
This commit is contained in:
parent
812cf36d52
commit
9117b45899
@ -152,9 +152,9 @@ class StaticRTree
|
|||||||
return min_dist;
|
return min_dist;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline double GetMinMaxDist(const FixedPointCoordinate &location) const
|
inline float GetMinMaxDist(const FixedPointCoordinate &location) const
|
||||||
{
|
{
|
||||||
double min_max_dist = std::numeric_limits<double>::max();
|
float min_max_dist = std::numeric_limits<double>::max();
|
||||||
// Get minmax distance to each of the four sides
|
// Get minmax distance to each of the four sides
|
||||||
FixedPointCoordinate upper_left(max_lat, min_lon);
|
FixedPointCoordinate upper_left(max_lat, min_lon);
|
||||||
FixedPointCoordinate upper_right(max_lat, max_lon);
|
FixedPointCoordinate upper_right(max_lat, max_lon);
|
||||||
|
@ -49,13 +49,13 @@ struct FixedPointCoordinate
|
|||||||
static double
|
static double
|
||||||
ApproximateDistance(const int lat1, const int lon1, const int lat2, const int lon2);
|
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);
|
const FixedPointCoordinate &c2);
|
||||||
|
|
||||||
static float ApproximateEuclideanDistance(const FixedPointCoordinate &c1,
|
static float ApproximateEuclideanDistance(const FixedPointCoordinate &c1,
|
||||||
const FixedPointCoordinate &c2);
|
const FixedPointCoordinate &c2);
|
||||||
|
|
||||||
static double
|
static float
|
||||||
ApproximateEuclideanDistance(const int lat1, const int lon1, const int lat2, const int lon2);
|
ApproximateEuclideanDistance(const int lat1, const int lon1, const int lat2, const int lon2);
|
||||||
|
|
||||||
static void convertInternalLatLonToString(const int value, std::string &output);
|
static void convertInternalLatLonToString(const int value, std::string &output);
|
||||||
|
Loading…
Reference in New Issue
Block a user