binhpt / slimmath

Automatically exported from code.google.com/p/slimmath
0 stars 0 forks source link

Half type incomplete and incorrect. #14

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The current Half type is incomplete, many operations defined on other number 
types are not defined for the Half type. It's also incorrect in places for 
example == should return false if both arguments are NaN.

Included is a patch for a more complete Half type, operations on it return 
floats in a similar way to how operations on Int16 return Int32. It is an 
immutable type in the same way that all basic number types are immutable, this 
is a breaking change as it means removing the setter for RawValue. It also 
includes basic Math methods Abs, Max, Min and Sign.

Original issue reported on code.google.com by Frassle on 25 Feb 2011 at 7:50

Attachments:

GoogleCodeExporter commented 8 years ago
I'm most likely going to have to hand code the changes in your patch file. I 
have already dramatically changed the Half type to conform more closely to the 
.net standards and to our own standards in SlimMath. However, things such as 
immutability have not been touched so those will be good changes to make.

Thanks for doing this for me!

Original comment by Jorgy...@gmail.com on 26 Feb 2011 at 10:04