Fixed inversion error.
This commit is contained in:
parent
b161ad781a
commit
8e31225b1c
|
@ -371,15 +371,7 @@ public class Matrix3f extends Matrix {
|
||||||
+ m01 * (m12 * m20 - m10 * m22)
|
+ m01 * (m12 * m20 - m10 * m22)
|
||||||
+ m02 * (m10 * m21 - m11 * m20);
|
+ m02 * (m10 * m21 - m11 * m20);
|
||||||
|
|
||||||
if (determinant == 1)
|
if (determinant != 0)
|
||||||
// matrix is proper orthogonal
|
|
||||||
transpose();
|
|
||||||
else if (determinant == -1)
|
|
||||||
{ // matrix is improper orthogonal
|
|
||||||
transpose();
|
|
||||||
negate();
|
|
||||||
}
|
|
||||||
else if (determinant != 0)
|
|
||||||
{
|
{
|
||||||
// do it the ordinary way
|
// do it the ordinary way
|
||||||
|
|
||||||
|
|
|
@ -575,15 +575,7 @@ public class Matrix4f extends Matrix {
|
||||||
|
|
||||||
float determinant = determinant();
|
float determinant = determinant();
|
||||||
|
|
||||||
if (determinant == 1)
|
if (determinant != 0)
|
||||||
// proper orthogonal
|
|
||||||
transpose();
|
|
||||||
else if (determinant == -1)
|
|
||||||
{ // improper orthogonal
|
|
||||||
transpose();
|
|
||||||
negate();
|
|
||||||
}
|
|
||||||
else if (determinant != 0)
|
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
m00 m01 m02 m03
|
m00 m01 m02 m03
|
||||||
|
|
Loading…
Reference in New Issue