ericman314 / UnitMath

JavaScript library for unit conversion and arithmetic
Apache License 2.0
30 stars 7 forks source link

compare() doesn't handle NaN very well #24

Closed danni closed 2 years ago

danni commented 4 years ago

The compare method isn't consistent in its handling of NaNs. It should sort NaN values consistently. At the moment it breaks the sorting as calls to the compare function return surprise values.

ericman314 commented 4 years ago

Thanks for reporting! This should be fixed now in v0.8.5.