-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
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).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels