mjs513 / monoxna

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

Patch MathHelper.Hermite + tests #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
WHAT THIS PATCH IS ABOUT:
I implemented MathHelper.Hermite and included tests for this function. I 
found it works with double precission floating points inside, while the 
params are single precission floats. Now all my tests pass, including 
extreme cases as float.MinValue, float.MaxValue and float.Nan.

ALSO INCLUDED:
Since I was working with revision 80, I had an issue with 
ModelTypeReader.cs, so the patch also comments all the content on this 
file to avoid generation errors.

FILES TOUCHED:
Modified:
src/Microsoft.Xna.Framework/Content/ContentReaders/ModelTypeReader.cs
  Commented all the code to avoid generation errors
src/Microsoft.Xna.Framework/MathHelper.cs
  Implemented MathHelper.Hermite method
tests/TestGame.cs
  Added a #if NUNITTESTS/#endif section for some references that were 
lacking

Added:
tests/Microsoft.Xna.Framework/MathHelperTests.cs
  Includes all tests for MathHelper.Hermite method.

Original issue reported on code.google.com by neoz...@gmail.com on 19 Jun 2007 at 9:10

Attachments:

GoogleCodeExporter commented 9 years ago
A new and refined implementation of MathHelper.Hermite is given in #1 Neozack 
patch.

Original comment by neoz...@gmail.com on 19 Jun 2007 at 3:13

GoogleCodeExporter commented 9 years ago
Are you sure that double precision is needed? Does the MS implementation give 
NaN
using the same numbers that gave you NaN? If you didn't test that, could you 
attach a
test that uses numbers that would result in a NaN if floats were used.

Original comment by alan.mcg...@gmail.com on 22 Jun 2007 at 4:29