diff --git a/include/Nazara/Math/Matrix4.inl b/include/Nazara/Math/Matrix4.inl index baab59da6..a3fe4b53a 100644 --- a/include/Nazara/Math/Matrix4.inl +++ b/include/Nazara/Math/Matrix4.inl @@ -150,16 +150,16 @@ NzVector4 NzMatrix4::GetColumn(unsigned int column) const ///FIXME: Est-ce une bonne idée de gérer la matrice de cette façon ? #if NAZARA_MATH_SAFE - if (row > 3) + if (column > 3) { NzStringStream ss; - ss << "Row out of range: (" << row << ") > 3"; + ss << "Row out of range: (" << column << ") > 3"; throw std::out_of_range(ss.ToString()); } #endif - T* ptr = (&m11) + row*4; + T* ptr = (&m11) + column*4; return NzVector4(ptr); } @@ -469,17 +469,17 @@ NzVector4 NzMatrix4::GetRow(unsigned int row) const ///FIXME: Est-ce une bonne idée de gérer la matrice de cette façon ? #if NAZARA_MATH_SAFE - if (column > 3) + if (row > 3) { NzStringStream ss; - ss << "Column out of range: (" << column << ") > 3"; + ss << "Column out of range: (" << row << ") > 3"; throw std::out_of_range(ss.ToString()); } #endif T* ptr = &m11; - return NzVector4(ptr[column], ptr[column+4], ptr[column+8], ptr[column+12]); + return NzVector4(ptr[row], ptr[row+4], ptr[row+8], ptr[row+12]); } template