Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Fixes parse error with complex shapes #6976
The bug reproduces when the point under test for the placement of the hole of the polygon has an x coordinate which only intersects with the ends of edges in the main polygon. The previous code threw out these cases as not relevant but an intersect at 1.0 of the distance from the start to the end of an edge is just as valid as an intersect at any other point along the edge. The fix corrects this and adds a test.
@jpountz Agreed it would be nice to fix the Double.compare. However I am having trouble working out what it is supposed to be achieving. It looks like it was probably put in as a bug fix but there don't seem to be any tests that rely on it. I don't want to just change it or remove it without some understanding since it could break something, although I don't know what.