You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The actual returned value is: {type:'Polygon', [[[0,0],[1,10],[2,2],[4,4],[0,0]]]}
In other words, it omits the [3,30] point. The reason it does this is that there is a duplicate coordinate of 3,30. When isPointOnLineSegment() evaluates either of the two cases of 3,30, it correctly returns true. But if I understand the contract of cleanCoords(), it should preserve one of the 3,30 coords.
And I think that would be a useful and expected contract to keep. Because then you can do things like @DenisCarriere 's earlier fix for intersect() which truncated the coord precision and then ran cleanCoords() to yank redundant points.
The text was updated successfully, but these errors were encountered:
If you agree with me this is a bug, I can add a PR for a test case and maybe a fix.
The actual returned value is:
{type:'Polygon', [[[0,0],[1,10],[2,2],[4,4],[0,0]]]}
In other words, it omits the [3,30] point. The reason it does this is that there is a duplicate coordinate of
3,30
. WhenisPointOnLineSegment()
evaluates either of the two cases of3,30
, it correctly returns true. But if I understand the contract ofcleanCoords()
, it should preserve one of the3,30
coords.And I think that would be a useful and expected contract to keep. Because then you can do things like @DenisCarriere 's earlier fix for
intersect()
which truncated the coord precision and then ran cleanCoords() to yank redundant points.The text was updated successfully, but these errors were encountered: