ubilabs / kd-tree-javascript

JavaScript k-d Tree Implementation
MIT License
642 stars 109 forks source link

0 should be a valid max distance #41

Open mwenko opened 1 year ago

mwenko commented 1 year ago

Currently a maxDistance of 0 is not allowed.

The if(maxDistance) condition will always evaluate to false when a maxDistance of 0 is specified.

This change allows a maxDistance of 0.