X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4e32eea148dafadbdd0712377c1b5038406ffde5..6dd7263a0fbd5d67e026acd79dfd97bbfec0b87a:/include/wx/matrix.h?ds=sidebyside diff --git a/include/wx/matrix.h b/include/wx/matrix.h index 314bd419af..53e0beb3de 100644 --- a/include/wx/matrix.h +++ b/include/wx/matrix.h @@ -12,10 +12,6 @@ #ifndef _WX_MATRIXH__ #define _WX_MATRIXH__ -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma interface "matrix.h" -#endif - //! headerfiles="matrix.h wx/object.h" #include "wx/object.h" @@ -52,8 +48,8 @@ public: void SetValue(int col, int row, double value); void operator = (const wxTransformMatrix& mat); - bool operator == (const wxTransformMatrix& mat); - bool operator != (const wxTransformMatrix& mat); + bool operator == (const wxTransformMatrix& mat) const; + bool operator != (const wxTransformMatrix& mat) const; //multiply every element by t wxTransformMatrix& operator*=(const double& t); @@ -218,15 +214,15 @@ inline double wxTransformMatrix::TransformY(double y) const inline bool wxTransformMatrix::IsIdentity1(void) const { return - (m_matrix[0][0] == 1.0 && - m_matrix[1][1] == 1.0 && - m_matrix[2][2] == 1.0 && - m_matrix[1][0] == 0.0 && - m_matrix[2][0] == 0.0 && - m_matrix[0][1] == 0.0 && - m_matrix[2][1] == 0.0 && - m_matrix[0][2] == 0.0 && - m_matrix[1][2] == 0.0) ; + ( wxIsSameDouble(m_matrix[0][0], 1.0) && + wxIsSameDouble(m_matrix[1][1], 1.0) && + wxIsSameDouble(m_matrix[2][2], 1.0) && + wxIsSameDouble(m_matrix[1][0], 0.0) && + wxIsSameDouble(m_matrix[2][0], 0.0) && + wxIsSameDouble(m_matrix[0][1], 0.0) && + wxIsSameDouble(m_matrix[2][1], 0.0) && + wxIsSameDouble(m_matrix[0][2], 0.0) && + wxIsSameDouble(m_matrix[1][2], 0.0) ); } // Calculates the determinant of a 2 x 2 matrix @@ -235,5 +231,4 @@ inline double wxCalculateDet(double a11, double a21, double a12, double a22) return a11 * a22 - a12 * a21; } -#endif - // _WX_MATRIXH__ +#endif // _WX_MATRIXH__