Bugfix: seam_position = aligned failed in certaim circumstances because of faulty concave points detection. Includes regression test

This commit is contained in:
Alessandro Ranellucci
2014-06-11 21:57:32 +02:00
parent 1674108bac
commit 5dcc1eab79
6 changed files with 54 additions and 3 deletions

View File

@@ -55,6 +55,12 @@ Point::coincides_with(const Point &point) const
return this->x == point.x && this->y == point.y;
}
bool
Point::coincides_with_epsilon(const Point &point) const
{
return std::abs(this->x - point.x) < SCALED_EPSILON && std::abs(this->y - point.y) < SCALED_EPSILON;
}
int
Point::nearest_point_index(const Points &points) const
{