X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/65b17727e699618086c8851f08ca35733c459155..4523ebb3f1c3576d687112d3a65141f7297ea02b:/include/wx/matrix.h?ds=sidebyside diff --git a/include/wx/matrix.h b/include/wx/matrix.h index 786815b158..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(__APPLE__) -#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); @@ -122,7 +118,7 @@ public: //!code: | -1 0 0 | //!code: matrix' = | 0 -1 0 | x matrix //!code: | 0 0 1 | - wxTransformMatrix& Mirror(bool x=TRUE, bool y=FALSE); + wxTransformMatrix& Mirror(bool x=true, bool y=false); // Translate by dx, dy: //!ex: //!code: | 1 0 dx | @@ -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__