Open nikunj1990 opened 7 years ago
we have resolved this issue...
for (var i = divisions; i >= 1; i--) {
// Preserve as int if input was int
**var newNum = Math.round(num / divisions * i);** // replace ParseInt with Math.round code in couter-up js
// Preserve float if input was float
if (isFloat) {
newNum = parseFloat(num / divisions * i).toFixed(decimalPlaces);
}
// Preserve commas if input had commas
if (isComma) {
while (/(\d+)(\d{3})/.test(newNum.toString())) {
newNum = newNum.toString().replace(/(\d+)(\d{3})/, '$1'+','+'$2');
}
}
nums.unshift(newNum);
}
It should be fixed in my fork, can you tell me if it's working for you? Thanks!
@nikunj1990 Thanks, you saved me with your fix. My problem happened to be with the number 205 showing up as 204.
@ciromattia I couldn't get your fork to work but that just might be something on my end.
@ciromattia you are life saver, updating the library solved it!
Hello,
For eg. i added 60,056 and when it count and finish it shows 60,055 and 107,235 shows 107,234