Commit 9f530b57 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Get rid of some powf() calls.

parent c917a987
......@@ -1795,21 +1795,21 @@ static inline unsigned short float_32_to_16(const float *in)
if (isinf(*in))
return (*in < 0.0f ? 0xfc00 : 0x7c00);
if (tmp < powf(2, 10))
if (tmp < (float)(1u << 10))
{
do
{
tmp = tmp * 2.0f;
exp--;
} while (tmp < powf(2, 10));
} while (tmp < (float)(1u << 10));
}
else if (tmp >= powf(2, 11))
else if (tmp >= (float)(1u << 11))
{
do
{
tmp /= 2.0f;
exp++;
} while (tmp >= powf(2, 11));
} while (tmp >= (float)(1u << 11));
}
mantissa = (unsigned int)tmp;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment