Skip to content
Snippets Groups Projects
Commit e4056410 authored by DragonGeo2's avatar DragonGeo2 Committed by Amorilia
Browse files

Make AsQuaternion a const member function (cherry-picked from aedra svn revision 1).

parent 35f43886
No related branches found
No related tags found
No related merge requests found
......@@ -621,7 +621,7 @@ struct Matrix33 {
/*! Returns a quaternion representation of the rotation stored in this matrix.
* \return A quaternion with an equivalent rotation to the one stored in this matrix.
*/
NIFLIB_API Quaternion AsQuaternion();
NIFLIB_API Quaternion AsQuaternion() const;
/*! Calculates the determinant of this matrix.
* \return The determinant of this matrix.
......
......@@ -298,14 +298,14 @@ Matrix33::Matrix33() {
*this = Matrix33::IDENTITY;
}
Quaternion Matrix33::AsQuaternion() {
Quaternion Matrix33::AsQuaternion() const {
Quaternion quat;
float tr, s, q[4];
int i, j, k;
int nxt[3] = {1, 2, 0};
Matrix33 & m = *this;
const Matrix33 & m = *this;
// compute the trace of the matrix
tr = m[0][0] + m[1][1] + m[2][2];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment