Refactors Camera aspect ratio and calculation of plane points.
Reviewed By: elexis
Commented By: wraitii
Differential Revision: https://code.wildfiregames.com/D2020
Refactors Camera aspect ratio and calculation of plane points.
Description
Details
Event Timeline
Comment Actions According to https://launchpadlibrarian.net/475855591/buildlog_ubuntu-bionic-i386.0ad_0.0.24~r23598-0ubuntu1~18.04~wfg0_BUILDING.txt.gz by @ricotz, it fails to pass the tests on i386 On Ubuntu 18:04 (gcc7) doesn't work https://launchpad.net/~wfg/+archive/ubuntu/0ad.dev/+packages
Comment Actions In TestCamera::test_persepctive_plane_points: /<<PKGBUILDDIR>>/source/graphics/tests/test_Camera.h:163: Error: Expected (quad == expectedFarQuad), found ({ 02 00 CA C2 02 00 CA C2 ... } != { 00 00 CA C2 00 00 CA C2 ... }) ..Skipping map generator tests (can't find binaries/data/mods/public/maps/random/tests/) .....................................................................................................................................................................................................................................Skipping globalscripts tests (can't find binaries/data/mods/public/globalscripts/tests/) .Skipping component scripts tests (can't find binaries/data/mods/public/simulation/components/tests/setup.js) ..................................................................................................... Failed 1 and Skipped 0 of 336 tests Just a guess, but if the computation is subject to rounding errors, then those should be fixed point types in the scope of the test or rather the test not be written that is subject to rounding issues. Comment Actions I guess camera projections do not have to be exact. But what is strange is that i seems to be fixed with a more recent version of GCC. Comment Actions Although the fix is correct (floats should generally not be checked for equality), I am still dubious about that GCC bug. |