We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3cb78fd commit f74c9c5Copy full SHA for f74c9c5
include/earcut.hpp
@@ -668,7 +668,8 @@ Earcut<Coord, N>::getLeftmost(Node* start) {
668
// check if a diagonal between two polygon nodes is valid (lies in polygon interior)
669
template <typename Coord, typename N>
670
bool Earcut<Coord, N>::isValidDiagonal(Node* a, Node* b) {
671
- return !intersectsPolygon(a, a, b) &&
+ return a->next->i != b->i && a->prev->i != b->i &&
672
+ !intersectsPolygon(a, a, b) &&
673
locallyInside(a, b) && locallyInside(b, a) &&
674
middleInside(a, a->v, b->v);
675
}
0 commit comments