Counter-Up icon indicating copy to clipboard operation
Counter-Up copied to clipboard

ending up with different number than starting one

Open prk3 opened this issue 8 years ago • 5 comments

example input for reproducing this bug: html number: 2014 delay: 10 time: 3000

this bug is caused by parsing numbers to int instead of rounding them. just replace parseInt with Math.round.

prk3 avatar Aug 28 '16 23:08 prk3

I have the same problem: number: 29 delay: 10 time: 1000

I fixed this bug by replacing line 40 var newNum = parseInt(num / divisions * i); with: (num / divisions * i).toFixed();

I hope this helps you

dispa avatar Oct 05 '16 17:10 dispa

Had same problem and that made me crazy. Only 29 had this problem :+1:

zur4ik avatar Oct 27 '16 11:10 zur4ik

It should be fixed in my fork, can you tell me if it's working for you? Thanks!

ciromattia avatar Feb 24 '17 17:02 ciromattia

@ciromattia yes, @dispa's fix solved the problem

zur4ik avatar Feb 25 '17 11:02 zur4ik

yes, fixed

dispa avatar Mar 20 '17 20:03 dispa