google-code-export / monoxna

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

#2 Neozack - MathHelper + Vector + Rob's Patch #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
THIS PATCH INCLUDES:
1. The whole implementation of the MathHelper mathematical methods, and 
tests that check that both implementations do the same.
2. The refactoring of the Vector classes mathematical operations (Vector2, 
Vector3 and Vector4), some tests improved, some changed and some extended.
3. Rob's Patch to solve issue tagged with id:13 on the issue tracker.

SVN VERSION USED
I've been using the last SVN version:80.

FILES TOUCHED:
src/Microsoft.Xna.Framework/Content/ContentReaders/ModelTypeReader.cs
src/Microsoft.Xna.Framework/Graphics/Model.cs
src/Microsoft.Xna.Framework/Graphics/ModelBone.cs
src/Microsoft.Xna.Framework/Graphics/ModelBoneCollection.cs
  This files are improved and thanks to Rob's patch it does not cause 
crash on compiling. The changes of these files are the result of using his 
patch on my working copy.

src/Microsoft.Xna.Framework/MathHelper.cs
  This file is completely coded with the exception of the inherited 
methods. All mathematical methods, hovever, are coded, and some are 
improved after checking results against MS's XNA.

src/Microsoft.Xna.Framework/Vector2.cs
src/Microsoft.Xna.Framework/Vector3.cs
src/Microsoft.Xna.Framework/Vector4.cs
  These classes now make use of MathHelper for their methods. That's been 
done with two purposes in mind: 1) if specifications change or 
improvements are done, we only have to change the code at one file, 
instead of all; 2) we don't have code repeated once and again through 
several files. Moreover, the code on the previous functions now has been 
improved to work even on trying situations (infinite values, NAN and 
overflow scenarios).

tests/Microsoft.Xna.Framework/MathHelperTests.cs
  This file is new in relation to SVN revision:80. It includes extensive 
tests against both MS and Open XNA implementations. Some minor tests have 
been flagged inside #if MSXNAONLY/#endif blocks, because they provide 
different results depending on the treatment of types between Mono/.Net. 
These tests, however have XPlatform versions afterwards that are not 
inside the #if/#endif block, so that it still works the test on both 
platforms.

tests/Microsoft.Xna.Framework/Vector2Tests.cs
tests/Microsoft.Xna.Framework/Vector3Tests.cs
tests/Microsoft.Xna.Framework/Vector4Tests.cs
  These files have been improved. Some tests there did nothing or were 
skipped by the Nunits. Now all tests are performed, they check important 
situations and focus on testing that the code is really XPlatform. Most of 
the tests added make use of MathHelper, so that it shows that behind the 
scenes, these classes make use of MathHelper. Hence more effort has been 
put in testing the MathHelper class than the Vector classes.

NOTES
1. Apart from the tests submitted, many others have been done, and all 
against both MSXNA and Mono.Xna.
2. Many of the tests performed showed that what sometimes we thought were 
minor differences between platforms (Mono/.Net) are in effect differences 
on implementation. Many methods, though returning single precission floats 
use doubles innerly. That has been added to some of the methods we already 
had and has been taken in account in the implementation of the new ones. 
Just for all to know, if some checking a == b seems not to work well, try 
to code the same function that returned a or b with double precission 
before using ApproximatelyEquals.
3. This patch substitutes all other patches I've sent.

-- Isaac L (aka Neozack)
-- neozack@gmail.com
-- 20070621

Original issue reported on code.google.com by neoz...@gmail.com on 21 Jun 2007 at 1:36

Attachments:

GoogleCodeExporter commented 9 years ago
This patch doesn't apply. The usual procedure for submitting patches which rely 
on
previous patches is to either close the previous patch, or create your new patch
relative to the old one. I'm going to need you to SVN up and recreate your 
patch.

Also, don't include someone else's patch in your own patch ;) When you do that, 
it
makes things really messy, If your patch relies on another patch in order to
function, then mention it in the report as opposed to including someone elses 
patch
in your own submission. I hope that makes sense ;)

Gimme a ping when you recreate the patch.

Good work!

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

GoogleCodeExporter commented 9 years ago

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

GoogleCodeExporter commented 9 years ago
Ok. That's why I hoped committing was quicker, because I keep on working over 
the 
same revision until a new revision is done. How do I cancel one issue, by the 
way? 
Jusf if that happens again ^^. Thank you!

Original comment by neoz...@gmail.com on 25 Jun 2007 at 3:09

GoogleCodeExporter commented 9 years ago
This issue is CANCELLED
-----------------------
All problems with this patch are solved in the new #3 Neozack patch.

Original comment by neoz...@gmail.com on 25 Jun 2007 at 5:12

GoogleCodeExporter commented 9 years ago
This patch was committed in version #3 of Neozack's patches.

Original comment by robloach on 27 Jun 2007 at 8:58