-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
backport filter pool key #4858
backport filter pool key #4858
Conversation
Works like before: https://jsfiddle.net/3kvazjw1/17/ - key = 'screen' I dont have examples with a bug, but I'm sure that solution is correct - we store the result instead of recalculation. |
“I’m sure the solution is correct”, I don’t like any uncertainty here. Can you please try to dig up an erroring example so we can verify? |
Its the same problem as in #4745 and in #4579 (comment) Extra multiplication and division can change the number, element cant return to the pool because key was changed. Are you sure you want a third demo for it? |
You are right. it was fun to reproduce it, we have one more case. Here it is: https://jsfiddle.net/3kvazjw1/21/ Chrome at 90% zoom gives us var res = 0.8999999761581421;
console.log(1 / res * res); shows That's why minWidth and minHeight are less than expected, and the key is wrong. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm satisfied here, this seems like a good solution. Thanks for verifying @ivanpopelyshev
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, math is ridiculous in js, for example const a = 0.1 + 0.7
will give 0.799999999999999
@cursedcoder all according to IEEE 754 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
#3866 and other issues.
@Patrick-Hammond confirmed that we still have the problem, and I want to solve it radical way.