Fil / d3-geo-voronoi

Voronoi / Delaunay tessellations on the sphere
ISC License
229 stars 24 forks source link

geo_hull: Use more semantically meaningful Set and Map #24

Closed martinfrances107 closed 3 years ago

martinfrances107 commented 3 years ago

I have given a detailed explanation in

https://github.com/Fil/d3-geo-voronoi/issues/23

Here is the PR .. in short

When visually inspecting this if statement

if (_hull[code]) delete _hull[code];

the possible value of _hull[code] that must be considered are or are TRUE, FALSE, undefined, NULL,

FALSE is unexpectedly not possible in practise ... in the PR the condition is restricted by the possible return type of .has() to true/false and so it much safer to handle/ reason with