Cloud Stack Ninja

I have a floating point number (for example): 0.004178174922295

How could I get the decremental function to make a calculations from this number to 0 in specific amount of time (for example 1 second)? Thanks.

Expected values:

0.004178174922295
0.004178174922294
0.004178174922293
...
0


Read more here: https://stackoverflow.com/questions/64362304/javascript-floating-point-numbers-interval-loop

Content Attribution

This content was originally published by XTRUST.ORG at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: