mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-01 19:26:16 +00:00
[WINED3D]
Replace 0/0, 1/0 with NAN and INFINITY svn path=/branches/cmake-bringup/; revision=50732
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user