From 84bba8aa20a3cae7c7d525cd54dbbfe95dadc672 Mon Sep 17 00:00:00 2001 From: DennisOSRM Date: Sat, 17 Dec 2011 18:47:32 +0100 Subject: [PATCH] Renaming function to have a more obvious name. --- Algorithms/DouglasPeucker.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Algorithms/DouglasPeucker.h b/Algorithms/DouglasPeucker.h index 66e1aba15..6f6ef303f 100644 --- a/Algorithms/DouglasPeucker.h +++ b/Algorithms/DouglasPeucker.h @@ -41,7 +41,7 @@ private: //Stack to simulate the recursion std::stack recursionStack; - double ComputeDistance(const _Coordinate& inputPoint, const _Coordinate& source, const _Coordinate& target) { + double ComputeDistanceOfPointToLine(const _Coordinate& inputPoint, const _Coordinate& source, const _Coordinate& target) { double r; const double x = (double)inputPoint.lat; const double y = (double)inputPoint.lon; @@ -104,7 +104,7 @@ public: std::size_t indexOfFarthestElement = pair.second; //find index idx of element with maxDistance for(std::size_t i = pair.first+1; i < pair.second; ++i){ - double distance = std::fabs(ComputeDistance(inputVector[i].location, inputVector[pair.first].location, inputVector[pair.second].location)); + double distance = std::fabs(ComputeDistanceOfPointToLine(inputVector[i].location, inputVector[pair.first].location, inputVector[pair.second].location)); if(distance > DouglasPeuckerThresholds[zoomLevel] && distance > maxDistance) { indexOfFarthestElement = i; maxDistance = distance;