Support we have a polygon with 4 nodes as fellows. We should see that point 0 and 4 are identical. So I think the calculation of point to segment 4-0 is unnecessary.
However, for compatible reason, it is appropriate to keep this redundant calculation, in case of non-closed polygons. Am I correct?
In https://github.com/mapbox/polylabel/blob/master/index.js#L95, we iterate each segments to calculate distance from point to segment.
Support we have a polygon with 4 nodes as fellows. We should see that point 0 and 4 are identical. So I think the calculation of point to segment 4-0 is unnecessary.
However, for compatible reason, it is appropriate to keep this redundant calculation, in case of non-closed polygons. Am I correct?