You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After incrementing the counter 5 times I expect to get the value 4105.128. But instead 4105.128000000001 is reported.
As far as I know implementing the counter as float will cause problems.
Quickfix: Math.round(counter*1000)/1000 would fix this. But the number of decimals has to be calculated to set the correct factor (1000 for 3 decimals).
The text was updated successfully, but these errors were encountered:
It's a known issue while working with numbers like that in JS. I would not know a good fix, without a setting for desired decimals. But I don#t think I like to add that, because it will confuse most users. So for now, I would say, use it with decimals at your own risk. ;)
A fix for you could also be to add a JS node behind the counter, and do the rounding by yourself.
Initial counter: 4105.123
Increment: 0.001
After incrementing the counter 5 times I expect to get the value 4105.128. But instead 4105.128000000001 is reported.
As far as I know implementing the counter as float will cause problems.
Quickfix: Math.round(counter*1000)/1000 would fix this. But the number of decimals has to be calculated to set the correct factor (1000 for 3 decimals).
The text was updated successfully, but these errors were encountered: