not consider numDecimals = 0
leohgbs opened this issue · comments
roundHalfEven(255.552,0)
demo: 255
answer: 256
my solution
if (numDecimals === 0) {
return roundHalfEven(value/10, 1)*10
}
roundHalfEven(255.552,0) demo: 255 answer: 256
my solution
if (numDecimals === 0) { return roundHalfEven(value/10, 1)*10 }
@leohgbs Thanks for catching that! Love your fix! Do you wanna send a PR?
Fixed in v1.2.1