Open Chris00 opened 10 months ago
This was omitted for consistency with the JavaScript version, which didn't add it because it was not that important for robustness but increased the bundle size notably (see https://github.com/mapbox/delaunator/pull/68):
Adding robust
incircle
would increase it more significantly (to 5322 bytes), but it doesn't seem necessary since this check only affects which triangles flip, and doesn't affect the integrity of the triangulation unlikeorient2d
.
Now as for hypot
, this is a deliberate optimization because Delaunator doesn't need exact distances, it only calculates squared ones which are much faster since they only need multiplication, without square root.
- hypot for your distance computations.
Thanks for your library. I saw that you use
robust
fororient2d
but I was wondering why you did not usePoint::in_circle
;I can make a PR if you agree to these changes.