mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-21 11:29:26 -07:00
Fix overflow in Point::ccw() affecting convex hull generation. Includes regression test
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user