Counter node bug

found a bug in counter. if increment is not an integer and you count up and down so that you cross zero a few times counter shows strange big numbers where it should show zero. see attached patch.

counterbug.v4p (4.9 kB)

seems like the counter node is really working in a way that it increases or decreases the output and stores that value for the next frame. in this way however some rounding errors can occur. what you see in your patch is not a very big number, but instead it is a very very small number

e.g. 1.23456789E-018 = 0.00000000000000000123456789

E-… means very small number
E… means very big number

but it would be nice if the value would be rounded in the iobox (but we would need to make this an option in the iobox, so that the “scientific” view on the number is still possible)