mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-22 00:01:09 -06:00
Fix overflow in Point::ccw() affecting convex hull generation. Includes regression test
This commit is contained in:
parent
0d7f0705f0
commit
90194ee581
4 changed files with 11 additions and 3 deletions
|
@ -125,7 +125,7 @@ Point::distance_to(const Line &line) const
|
|||
double
|
||||
Point::ccw(const Point &p1, const Point &p2) const
|
||||
{
|
||||
return (p2.x - p1.x)*(this->y - p1.y) - (p2.y - p1.y)*(this->x - p1.x);
|
||||
return (double)(p2.x - p1.x)*(double)(this->y - p1.y) - (double)(p2.y - p1.y)*(double)(this->x - p1.x);
|
||||
}
|
||||
|
||||
double
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue