Serious-Engine/Sources/Engine/Math
Daniel Gibson 8d26863a51 Improve some portable C implementations of math functions
* FloatToInt() should now  round correctly ot nearest, even for
  negative numbers
* Log2() now calls log2f() instead of log10()*3.321 - no idea what the
  previous code was about, I doubt it's faster (and the ASM code uses
  something like log2, too).
* FastLog2() (for integers) now uses __builtin_clz() when building with
  GCC/clang - the resulting ASM should be pretty similar to the inline
  ASM below. I wonder why that function takes signed ints, log2(-1) in
  reality is an irrational number (but the function returns 31)..
  Also, both the inline ASM and my version return 0 for Log2(0), but
  INT_MIN would be closer to the truth
* commented out FastMaxLog2(), it's unused.
* implemented _rotl() using a fast(er) trick from
  http://blog.regehr.org/archives/1063
2016-04-17 23:15:56 +02:00
..
AABBox.h Merge github.com:Croteam-Official/Serious-Engine 2016-04-02 23:56:12 -04:00
Clipping.inl First attempt to hand-merge Ryan's Linux and Mac OS X port. 2016-03-28 23:46:13 -04:00
FixInt.h First pass at cleaning out 64-bit issues. 2016-04-06 23:20:29 -04:00
Float.cpp Merge branch 'master' of git://github.com/ptitSeb/Serious-Engine into ptitSeb-master 2016-04-06 23:27:55 -04:00
Float.h Add GPL header to files 2016-03-11 18:20:51 -06:00
Functions.cpp Merge github.com:Croteam-Official/Serious-Engine 2016-04-02 23:56:12 -04:00
Functions.h Improve some portable C implementations of math functions 2016-04-17 23:15:56 +02:00
Geometry_DOUBLE.cpp Merge github.com:Croteam-Official/Serious-Engine 2016-04-02 23:56:12 -04:00
Geometry.cpp Merge github.com:Croteam-Official/Serious-Engine 2016-04-02 23:56:12 -04:00
Geometry.h Add GPL header to files 2016-03-11 18:20:51 -06:00
Geometry.inl First attempt to hand-merge Ryan's Linux and Mac OS X port. 2016-03-28 23:46:13 -04:00
Matrix.h Merge github.com:Croteam-Official/Serious-Engine 2016-04-02 23:56:12 -04:00
OBBox.h Merge github.com:Croteam-Official/Serious-Engine 2016-04-02 23:56:12 -04:00
Object3D_CSG.cpp First pass at cleaning out 64-bit issues. 2016-04-06 23:20:29 -04:00
Object3D_IO.cpp Merge github.com:Croteam-Official/Serious-Engine 2016-04-02 23:56:12 -04:00
Object3D.cpp Merge github.com:Croteam-Official/Serious-Engine 2016-04-02 23:56:12 -04:00
Object3D.h Merge github.com:Croteam-Official/Serious-Engine 2016-04-02 23:56:12 -04:00
ObjectSector.cpp First pass at cleaning out 64-bit issues. 2016-04-06 23:20:29 -04:00
Placement.cpp Merge github.com:Croteam-Official/Serious-Engine 2016-04-02 23:56:12 -04:00
Placement.h Merge github.com:Croteam-Official/Serious-Engine 2016-04-02 23:56:12 -04:00
Plane.h Merge github.com:Croteam-Official/Serious-Engine 2016-04-02 23:56:12 -04:00
Projection_DOUBLE.h Add GPL header to files 2016-03-11 18:20:51 -06:00
Projection_Isometric.cpp Merge github.com:Croteam-Official/Serious-Engine 2016-04-02 23:56:12 -04:00
Projection_Parallel.cpp Merge github.com:Croteam-Official/Serious-Engine 2016-04-02 23:56:12 -04:00
Projection_Perspective.cpp Merge github.com:Croteam-Official/Serious-Engine 2016-04-02 23:56:12 -04:00
Projection_Simple_DOUBLE.cpp Merge github.com:Croteam-Official/Serious-Engine 2016-04-02 23:56:12 -04:00
Projection_Simple.cpp Merge github.com:Croteam-Official/Serious-Engine 2016-04-02 23:56:12 -04:00
Projection.cpp Merge github.com:Croteam-Official/Serious-Engine 2016-04-02 23:56:12 -04:00
Projection.h Merge github.com:Croteam-Official/Serious-Engine 2016-04-02 23:56:12 -04:00
Quaternion.h Float fest\! 2016-04-07 18:13:50 +02:00
TextureMapping.cpp Merge github.com:Croteam-Official/Serious-Engine 2016-04-02 23:56:12 -04:00
TextureMapping.h Merge github.com:Croteam-Official/Serious-Engine 2016-04-02 23:56:12 -04:00
Vector.h Float fest\! 2016-04-07 18:13:50 +02:00