C # - Is there a 32 bit floating point math library?

I plan to make my next project in C #, not C ++ (using SlimDX).

All directX uses float, however System.Math uses doubling. This means a constant conversion between floats and doublings.

Therefore, ideally, I would like to write all the code using float, since I do not get the added precision of converting to floats from takes all the time anyway ...

However, Ive been unable to find a set of mathematical functions for .net that uses floats. I could, of course, write my own library in C #, but id would rather use an existing library that has been optimized, etc ...

+5
source share
2 answers

XNA provides several mathematical constants (including 3D specialists such as PI / 2, etc.) and some advanced mathematical functions with float accuracy (although not trigonometric functions). Although this is most likely not an option for you, since XNA is not as thin as SlimDX, this, of course, means that System.Math is either missing something or the performance is not so great. In my experience, you really do not expect that much for yourself, because most of them are processed either by geometry classes (Matrix, Quaternion, Vector), or by the GPU itself.

, SlimDX, . , , , , ( 16- ) . , ( , , ).

+2

, , , , .

NMath CenterSpace. , .

+1

All Articles