mapbox / delaunator

An incredibly fast JavaScript library for Delaunay triangulation of 2D points
https://mapbox.github.io/delaunator/
ISC License
2.24k stars 139 forks source link

Do not throw `No Delaunay triangulation exists for this input.` #46

Closed johnd0e closed 5 years ago

johnd0e commented 5 years ago

Input data are not always guaranteed to have delaunay solution, and there is no way to verify it other then call Delaunator.

But in this case Delaunator throws error, so to process this call correctly we have to wrap it into try/catch, which is not obvious, not documented, and not convenient.

I suppose that we do not need this error at all, 'cause there is more simple way to get the same info: empty output arrays.

johnd0e commented 5 years ago

I suppose that we do not need this error at all [...]

You could disagree, but then it's necessary to document this error.

mourner commented 5 years ago

Fixed by #47.