From 3782cef5b1de82f91db8233918db77fdbac383ea Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Wed, 16 Feb 2011 12:54:58 +0000 Subject: [PATCH] [WINED3D] Replace 0/0, 1/0 with NAN and INFINITY svn path=/branches/cmake-bringup/; revision=50732 --- dll/directx/wine/wined3d/wined3d_private.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dll/directx/wine/wined3d/wined3d_private.h b/dll/directx/wine/wined3d/wined3d_private.h index 0b6f57efe52..1956825be8f 100644 --- a/dll/directx/wine/wined3d/wined3d_private.h +++ b/dll/directx/wine/wined3d/wined3d_private.h @@ -196,8 +196,8 @@ static inline float float_16_to_32(const unsigned short *in) { } else if(e < 31) { return sgn * powf(2, (float)e - 15.0f) * (1.0f + ((float)m / 1024.0f)); } else { - if(m == 0) return sgn / 0.0f; /* +INF / -INF */ - else return 0.0f / 0.0f; /* NAN */ + if(m == 0) return sgn * INFINITY; /* +INF / -INF */ + else return NAN; } } @@ -218,8 +218,8 @@ static inline float float_24_to_32(DWORD in) } else { - if (m == 0) return sgn / 0.0f; /* +INF / -INF */ - else return 0.0f / 0.0f; /* NAN */ + if (m == 0) return sgn * INFINITY; /* +INF / -INF */ + else return NAN; } }