use wxIsSameDouble() and wxIsNullDouble() for warning-less double comparison of doubles
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35705 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -214,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
|
||||
@@ -231,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__
|
||||
|
Reference in New Issue
Block a user