Fixed wrong implementation of concave_points() and convex_points() in C++. #2384

This commit is contained in:
Alessandro Ranellucci 2014-12-07 19:53:22 +01:00
parent 95f7bcb9fe
commit 6ce651eb4a
7 changed files with 53 additions and 18 deletions

View file

@ -160,6 +160,13 @@ Point::ccw(const Line &line) const
return this->ccw(line.a, line.b);
}
// returns the CCW angle between this-p1 and this-p2
double
Point::ccw_angle(const Point &p1, const Point &p2) const
{
return Line(*this, p1).orientation() - Line(*this, p2).orientation();
}
Point
Point::projection_onto(const MultiPoint &poly) const
{