X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fbfb8bcc3fa17e079d4219655b173f8ed2ccc65a..412b97cc9a807ebcecefb403c949597a9f3d2199:/include/wx/matrix.h diff --git a/include/wx/matrix.h b/include/wx/matrix.h index 8061667a3a..fbdfae5308 100644 --- a/include/wx/matrix.h +++ b/include/wx/matrix.h @@ -1,12 +1,12 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: matrix.h -// Purpose: wxTransformMatrix class. NOT YET USED -// Author: Chris Breeze, Julian Smart +// Name: wx/matrix.h +// Purpose: wxTransformMatrix class. NOT YET USED +// Author: Chris Breeze, Julian Smart // Modified by: Klaas Holwerda -// Created: 01/02/97 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart, Chris Breeze -// Licence: wxWindows licence +// Created: 01/02/97 +// RCS-ID: $Id$ +// Copyright: (c) Julian Smart, Chris Breeze +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_MATRIXH__ @@ -14,6 +14,7 @@ //! headerfiles="matrix.h wx/object.h" #include "wx/object.h" +#include "wx/math.h" //! codefiles="matrix.cpp" @@ -214,15 +215,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 @@ -231,5 +232,4 @@ inline double wxCalculateDet(double a11, double a21, double a12, double a22) return a11 * a22 - a12 * a21; } -#endif - // _WX_MATRIXH__ +#endif // _WX_MATRIXH__