super-ienien/percent-round

Sometimes result array contains negative values

YounesZADI opened this issue · 3 comments

When using the round function using this input:

const input = [ 2556178, 375399.16, 13613028.38, 225041.27, 24682130.77, 927723.57, 448043.04, 369641.8, 1107498.78, 9013.48, 2352854.55, 856810.85, 772711.17, 887472.4, ];

I am getting this output:
[5,1,28,-1,50,2,1,1,2,0,5,2,2,2]

As you can see the 4th index is negative.

Hi,

thanks for the report. I just fixed it. Please update to v2.3.1

Sorry, I just saw your PR...

No worries, thank you for the fix... I'll close the PR