Merge pull request #128 from Frassle/half-fix
Fix a bug in single->half conversion.
This commit is contained in:
commit
aa4e8ef9aa
1 changed files with 1 additions and 1 deletions
|
@ -228,7 +228,7 @@ namespace OpenTK
|
||||||
|
|
||||||
mantissa = mantissa + 0x00000fff + ((mantissa >> 13) & 1);
|
mantissa = mantissa + 0x00000fff + ((mantissa >> 13) & 1);
|
||||||
|
|
||||||
if ((mantissa & 0x00800000) == 1)
|
if ((mantissa & 0x00800000) != 0)
|
||||||
{
|
{
|
||||||
mantissa = 0; // overflow in significand,
|
mantissa = 0; // overflow in significand,
|
||||||
exponent += 1; // adjust exponent
|
exponent += 1; // adjust exponent
|
||||||
|
|
Loading…
Reference in a new issue