mikolalysenko / point-in-big-polygon

Industrial strength point in polygon test
MIT License
19 stars 3 forks source link

Does it matter if loops are explicitly closed? #2

Open letmaik opened 8 years ago

letmaik commented 8 years ago

The example in the README doesn't repeat the first vertex at the end of a loop. Does the algorithm also work if the first vertex is repeated at the end? Does that have any consequences, maybe performance wise?

mikolalysenko commented 8 years ago

You shouldn't put the extra vertex at the end of each loop, they are automatically closed. I think that putting that extra vertex could break things, though I'd need to check to be sure.