Doing transpose twice is equivalent to not doing it at all.

This commit is contained in:
Luqman Aden 2012-11-21 16:03:33 -05:00
parent 0c21294a53
commit 118fcdf7e3

View file

@ -852,7 +852,7 @@ pub impl<T:Copy Num NumCast DefaultEq Signed Ord> Mat4<T>: NumericMatrixNxN<T, V
// Gauss Jordan Elimination with partial pivoting
let mut a = self.transpose();
let mut a = copy self;
let mut inv: Mat4<T> = NumericMatrixNxN::identity();
// Find largest pivot column j among rows j..3
@ -895,7 +895,7 @@ pub impl<T:Copy Num NumCast DefaultEq Signed Ord> Mat4<T>: NumericMatrixNxN<T, V
}
}
}
Some(inv.transpose())
Some(inv)
}
}