[PATCH 7/7] d3dx9: Test raw vertex data for D3DXCreateSphere.

Dan Kegel dank at kegel.com
Wed Jun 23 22:44:10 CDT 2010

Misha wrote:

+                    /* comparisons of 0.0f with -0.0f do not quite
seem to work correctly */

Boy, that's for sure.

+                    todo_wine ok(
vertex_data[i].x==test_vertex_data[i].x || (fabsf(vertex_data[i].x) <
0.0001f && fabsf(test_vertex_data[i].x) < 0.0001f), "Got result %f,
expected %f\n",vertex_data[i].x,test_vertex_data[i].x);

You probably want to define an AlmostEqual() function and use that
rather than repeating the logic.  See

and the paper it points to,

- Dan

More information about the wine-devel mailing list