Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fix a bug in single->half conversion. #128

Merged
merged 1 commit into from Jun 2, 2014

Conversation

Projects
None yet
2 participants
Contributor

Frassle commented Jun 2, 2014

The original C code had if(m & 0x00800000) which is true if the
expresssion does not evaluate to zero. This was inncorretly translated
to the C# code if((m & 0x00800000) == 1) which only evaluates true if
the expression evalaute to 1, which it never does. The correct test is
to test not equal to zero (!= 0).

@Frassle Frassle Fix a bug in single->half conversion.
The original C code had if(m & 0x00800000) which is true if the
expresssion does not evaluate to zero. This was inncorretly translated
to the C# code if((m & 0x00800000) == 1) which only evaluates true if
the expression evalaute to 1, which it never does. The correct test is
to test not equal to zero (!= 0).
5481aa7

@thefiddler thefiddler added a commit that referenced this pull request Jun 2, 2014

@thefiddler thefiddler Merge pull request #128 from Frassle/half-fix
Fix a bug in single->half conversion.
aa4e8ef

@thefiddler thefiddler merged commit aa4e8ef into opentk:develop Jun 2, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details

@Frassle Frassle deleted the Frassle:half-fix branch Jun 2, 2014

@thefiddler thefiddler added this to the 1.1.3 milestone Jun 20, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment