--- trunk/src/math/SquareMatrix3.hpp 2005/04/15 22:04:00 507 +++ trunk/src/math/SquareMatrix3.hpp 2006/02/02 17:14:15 883 @@ -188,9 +188,9 @@ namespace oopse { q[3] = (this->data_[0][1] - this->data_[1][0]) * s; } else { - ad1 = fabs( this->data_[0][0] ); - ad2 = fabs( this->data_[1][1] ); - ad3 = fabs( this->data_[2][2] ); + ad1 = this->data_[0][0]; + ad2 = this->data_[1][1]; + ad3 = this->data_[2][2]; if( ad1 >= ad2 && ad1 >= ad3 ){ @@ -316,6 +316,16 @@ namespace oopse { m /= det; return m; + } + + SquareMatrix3 transpose() const{ + SquareMatrix3 result; + + for (unsigned int i = 0; i < 3; i++) + for (unsigned int j = 0; j < 3; j++) + result(j, i) = this->data_[i][j]; + + return result; } /** * Extract the eigenvalues and eigenvectors from a 3x3 matrix.