mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-16 00:35:53 +08:00
Fix of polygon_is_convex()
This commit is contained in:
parent
49906da1c5
commit
453ef52e9f
@ -345,7 +345,7 @@ bool polygon_is_convex(const Points &poly)
|
|||||||
for (size_t i = 0; i < poly.size(); ++ i) {
|
for (size_t i = 0; i < poly.size(); ++ i) {
|
||||||
Point p2 = poly[i];
|
Point p2 = poly[i];
|
||||||
auto det = cross2((p1 - p0).cast<int64_t>(), (p2 - p1).cast<int64_t>());
|
auto det = cross2((p1 - p0).cast<int64_t>(), (p2 - p1).cast<int64_t>());
|
||||||
if (det >= 0)
|
if (det < 0)
|
||||||
return false;
|
return false;
|
||||||
p0 = p1;
|
p0 = p1;
|
||||||
p1 = p2;
|
p1 = p2;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user