d3dx9_36: Use cross-platform versions of infinity and NaN.
Dylan Smith
dylan.ah.smith at gmail.com
Tue Jul 5 08:18:25 CDT 2011
On Tue, Jul 5, 2011 at 8:27 AM, Marvin <testbot at testbot.winehq.org> wrote:
> === WXPPROSP3 (32 bit math) ===
> math.c:2275: Test failed: Got ffff, expected 7fff or 7fff for index 18.
0.0f/0.0f = -nan (0xffc00000)
-(0.0f/0.0f) = nan (0x7fc00000)
msvc complains about dividing by zero. I found the following works
around the error for MS Visual Studio 2010, although later version
might try to be "smarter".
static const float z = 0.0f;
const float neg_nan = 0.0f/z;
const float pos_nan = -(0.0f/z);
Note that neg_nan and pos_nan can't be static.
More information about the wine-devel
mailing list