-
Notifications
You must be signed in to change notification settings - Fork 669
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
Add epsilon to float comparison #3635
Conversation
Adds an epsilon when comparing float values in conformance/extensions/webgl-depth-texture.html. As-is, it is possible for tests to fail with output such as: At 2,0, expected within [0.2,0.6], was 0.600 FAIL At 2,0, expected within [0.2,0.6], was 0.600
600e4ab
to
e2f21be
Compare
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.
Some of the expectations already have epsilons in them (where the expected min and max are equal). This will double epsilon for those.
It seems the original test was trying to avoid overapplying epsilons but it doesn't seem very important to me. So the epsilons could be removed above (lines 327-328, 330-341) and applied here only.
Removes the epsilon value added to certain parts of the expected min/max values in conformance/extensions/webgl-depth-texture.html, instead using only the epsilon applied when actually comparing values.
Removed. |
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.
Looks good to me too, but let's give @kainino0x a chance to review.
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.
This is what I suggested, so LGTM, but I suggested it, so approving based on Ken's secondary review.
Thanks Kai for suggesting this and reviewing. Merging now. |
Adds an epsilon when comparing float values in
conformance/extensions/webgl-depth-texture.html. As-is, it is possible for tests to fail with output such as:
At 2,0, expected within [0.2,0.6], was 0.600
FAIL At 2,0, expected within [0.2,0.6], was 0.600