X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fbfb8bcc3fa17e079d4219655b173f8ed2ccc65a..c59f6793fb6c116e6b9abdaca4de0c4a08a0e5b0:/include/wx/gdicmn.h?ds=sidebyside diff --git a/include/wx/gdicmn.h b/include/wx/gdicmn.h index 5018eece64..6033cdf7cd 100644 --- a/include/wx/gdicmn.h +++ b/include/wx/gdicmn.h @@ -21,6 +21,7 @@ #include "wx/string.h" #include "wx/fontenc.h" #include "wx/hashmap.h" +#include "wx/math.h" // --------------------------------------------------------------------------- // forward declarations @@ -269,10 +270,14 @@ public: wxRealPoint operator+(const wxRealPoint& pt) const { return wxRealPoint(x + pt.x, y + pt.y); } wxRealPoint operator-(const wxRealPoint& pt) const { return wxRealPoint(x - pt.x, y - pt.y); } - bool operator==(const wxRealPoint& pt) const { return x == pt.x && y == pt.y; } - bool operator!=(const wxRealPoint& pt) const { return x != pt.x || y != pt.y; } + bool operator==(const wxRealPoint& pt) const + { + return wxIsSameDouble(x, pt.x) && wxIsSameDouble(y, pt.y); + } + bool operator!=(const wxRealPoint& pt) const { return !(*this == pt); } }; + class WXDLLEXPORT wxPoint { public: