Move semantics on MultiPoint, Polygon, Polyline.

Append methods on Polyline.
squared length function on point->DistanceTo
This commit is contained in:
bubnikv 2017-01-19 13:43:29 +01:00
parent 50cdf8e6d1
commit 0b90ebd74e
6 changed files with 69 additions and 35 deletions

View file

@ -174,14 +174,6 @@ Point::nearest_waypoint(const Points &points, const Point &dest, Point* point) c
return true;
}
double
Point::distance_to(const Point &point) const
{
double dx = ((double)point.x - this->x);
double dy = ((double)point.y - this->y);
return sqrt(dx*dx + dy*dy);
}
/* distance to the closest point of line */
double
Point::distance_to(const Line &line) const