tests: Cast abs() result to unsigned int in compare_float().
Merge request reports
Activity
I thought I wrote an
absdiff()
function for this exact scenario...Oh yeah, it's in the d3d9 tests. It's not terribly clever. All it does is make sure the greater of the two operands is the minuend:
static inline unsigned int absdiff(unsigned int x, unsigned int y) { return x > y ? x - y : y - x; }
SeeEDIT: Wait, that one didn't go in yet. I could've sworn I had one like that in...wine/dlls/d3d9/tests/visual.c:66
.Edited by Chip Davis
I thought I wrote an
absdiff()
function for this exact scenario...Oh yeah, it's in the d3d9 tests. It's not terribly clever. All it does is make sure the greater of the two operands is the minuend:
static inline unsigned int absdiff(unsigned int x, unsigned int y) { return x > y ? x - y : y - x; }
Seewine/dlls/d3d9/tests/visual.c:66
. EDIT: Wait, that one didn't go in yet. I could've sworn I had one like that in...Well, we have compare_uint() in the various Wine D3D tests. So does vkd3d, and we could probably use "return compare_uint(x, y, ulps);" here.
added 1 commit
- c7a5192a - tests: Use compare_uint() in compare_float().
added 28 commits
-
c7a5192a...bdfec488 - 27 commits from branch
wine:master
- 69ecfdfb - tests: Use compare_uint() in compare_float().
-
c7a5192a...bdfec488 - 27 commits from branch