Commit 8537ca8e authored by cutealien's avatar cutealien

- CMatrix4<T>::getInverse working now with FLT_MIN instead of...

- CMatrix4<T>::getInverse working now with FLT_MIN instead of ROUNDING_ERROR_f32 which fixes a bug reported by amin here: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=7&t=47422
NOTE: There's a good chance that this should be changed in more places where iszero is used, as that check is often about avoiding a division by 0. 

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4343 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 4797bbca
...@@ -31,6 +31,10 @@ ...@@ -31,6 +31,10 @@
#define FLT_MAX 3.402823466E+38F #define FLT_MAX 3.402823466E+38F
#endif #endif
#ifndef FLT_MIN
#define FLT_MIN 1.17549435e-38F
#endif
namespace irr namespace irr
{ {
namespace core namespace core
......
...@@ -1326,7 +1326,7 @@ namespace core ...@@ -1326,7 +1326,7 @@ namespace core
(m(0, 1) * m(1, 3) - m(0, 3) * m(1, 1)) * (m(2, 0) * m(3, 2) - m(2, 2) * m(3, 0)) + (m(0, 1) * m(1, 3) - m(0, 3) * m(1, 1)) * (m(2, 0) * m(3, 2) - m(2, 2) * m(3, 0)) +
(m(0, 2) * m(1, 3) - m(0, 3) * m(1, 2)) * (m(2, 0) * m(3, 1) - m(2, 1) * m(3, 0)); (m(0, 2) * m(1, 3) - m(0, 3) * m(1, 2)) * (m(2, 0) * m(3, 1) - m(2, 1) * m(3, 0));
if( core::iszero ( d ) ) if( core::iszero ( d, FLT_MIN ) )
return false; return false;
d = core::reciprocal ( d ); d = core::reciprocal ( d );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment