aboutsummaryrefslogtreecommitdiff
path: root/XY.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'XY.cpp')
-rw-r--r--XY.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/XY.cpp b/XY.cpp
index ad1262b..e2aa075 100644
--- a/XY.cpp
+++ b/XY.cpp
@@ -33,3 +33,13 @@ XY& XY::operator -= (const XY & rhs) {
return *this;
}
+bool XY::operator == (const XY& rhs) const {
+ if (this->x != rhs.x) return false;
+ if (this->y != rhs.y) return false;
+ return true;
+}
+
+bool XY::operator != (const XY& rhs) const {
+ return !(*this == rhs);
+}
+