MikeMcl/decimal.js

isPositive() should return false for zero

charmbv opened this issue · 1 comments

Currently the function isPositive() returns true for a zero value. This should be false.

I don't really disagree but this library has signed zeros like JavaScript numbers, and that was an early design decision I have no interest in revisiting.

Decimal(-0).isNegative()    // true
Decimal(0).isPositive()     // true

isZero can be used to detect zero.