wined3d: Use INFINITY.

This commit is contained in:
Thomas Faber 2012-06-17 16:07:30 +02:00 committed by Alexandre Julliard
parent cb8af0152c
commit a6510b3fbc
2 changed files with 3 additions and 3 deletions

View File

@ -1049,7 +1049,7 @@ void state_fogstartend(struct wined3d_context *context, const struct wined3d_sta
fogend = tmpvalue.f;
/* In GL, fogstart == fogend disables fog, in D3D everything's fogged.*/
if(fogstart == fogend) {
fogstart = -1.0f / 0.0f;
fogstart = -INFINITY;
fogend = 0.0f;
}
break;

View File

@ -199,7 +199,7 @@ 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 */
if(m == 0) return sgn * INFINITY;
else return NAN;
}
}
@ -221,7 +221,7 @@ static inline float float_24_to_32(DWORD in)
}
else
{
if (m == 0) return sgn / 0.0f; /* +INF / -INF */
if (m == 0) return sgn * INFINITY;
else return NAN;
}
}