Closed mourner closed 5 years ago
@mrgreywater yes, see the comment above.
The "expected_triangles" is just meant as a test for earcut though. Libtess sometimes has a different result. So where previously you could easily see libtess produces a wrong result for empty_square, now you can't. I'm fine with it, just something to consider.
@mrgreywater ah, good point. I disabled it for libtess too because it was failing the build, but I rolled that back in the last commit.
libtess is now showing a deviation of -200% for issue107, which is unexpected, since it should be a positive value. But I can debug that later when it's merged if necessary.
@mrgreywater found the issue, fixed now.
A port of https://github.com/mapbox/earcut/pull/108
The test code change is about not comparing "area deviation" if the number of expected triangles is 0 (it doesn't make sense).