mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-16 11:17:51 -06:00
Move semantics on MultiPoint, Polygon, Polyline.
Append methods on Polyline. squared length function on point->DistanceTo
This commit is contained in:
parent
50cdf8e6d1
commit
0b90ebd74e
6 changed files with 69 additions and 35 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue