Page MenuHomeWildfire Games

Uses EPS to compare Camera quads after rP22547
ClosedPublic

Authored by vladislavbelov on Apr 28 2020, 7:46 PM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Commits
rP23608: Uses EPS to compare Camera quads after rP22547.
Summary

There was added a camera test in rP22547. It was a strict comparison of two CVector3D arrays. Which means each float component was going to compare directly as well.

There is an example of the failed test in comments of rP22547. Also you might notice that these float numbers differ only in floating point steps. So it might make sense to compare floats with EPS, since we can have some precision errors during few multiplications.

EPS = 1e-4 is used because it's minimal possible EPS for such float values. Maybe it make sense to increase it to 1e-3 since it's the pretty good precision still.

Test Plan
  1. Apply the patch and compile tests
  2. Run tests
  3. Make sure that they pass

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

vladislavbelov created this revision.Apr 28 2020, 7:46 PM
vladislavbelov edited the summary of this revision. (Show Details)

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2042/display/redirect

Stan added a subscriber: Stan.EditedApr 28 2020, 8:15 PM

Builds and passes the tests on my Surface 1 Pro with Kubunut 19:04

This revision was not accepted when it landed; it landed in state Needs Review.Apr 29 2020, 8:42 PM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.