Permalink
Browse files

Merge pull request #128 from Frassle/half-fix

Fix a bug in single->half conversion.
  • Loading branch information...
thefiddler committed Jun 2, 2014
2 parents 08829c4 + 5481aa7 commit aa4e8ef9aa80cfda485bf7b261ed3cbf34330b2a
Showing with 1 addition and 1 deletion.
  1. +1 −1 Source/OpenTK/Math/Half.cs
@@ -228,7 +228,7 @@ private UInt16 SingleToHalf(Int32 si32)
mantissa = mantissa + 0x00000fff + ((mantissa >> 13) & 1);
- if ((mantissa & 0x00800000) == 1)
+ if ((mantissa & 0x00800000) != 0)
{
mantissa = 0; // overflow in significand,
exponent += 1; // adjust exponent

0 comments on commit aa4e8ef

Please sign in to comment.