Skip to content

Commit 51587d1

Browse files
committed
fix(Polygon): checking if max_length is not too small in polygon degen function.
1 parent 80ca4d7 commit 51587d1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/geode/geometry/basic_objects/polygon.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,10 @@ namespace geode
253253
max_length_edge = e;
254254
}
255255
}
256+
if( max_length < GLOBAL_EPSILON )
257+
{
258+
return max_length;
259+
}
256260
const auto next =
257261
max_length_edge + 1 == nb_vertices ? 0 : max_length_edge + 1;
258262
const geode::InfiniteLine< dimension > line{

0 commit comments

Comments
 (0)