-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What to do about Utils.toFixedNumber usages? #243
Comments
Over in #279 (comment) it seems like using Utils.toFixedNumber is not working as a general solution, error is being collected that shows up in the 6th decimal place. |
After speaking with @jonathanolson, We think that the issue is that I was rounding stored values in the model, instead of just rounding when comparing/displaying in the view. I will refactor the model to store as granular of numbers as possible and hopefully all will work out. Thanks JO! |
After the above, no model values are being rounded to 6 decimal places. Next I'd like to factor out the remaining view usages to a single spot. |
This has been done. Thanks again @jonathanolson for the help. Once I understood the problem, this was an easy fix. |
There are currently 18 usages of
Utils.toFixedNumber( . . . , 6 );
. This is because lots of code in the sim uses triple equals (===
) to perform certain functions. I don't know if this problem is generally avoidable, or if I just need to do a better job of factoring this out.The text was updated successfully, but these errors were encountered: