]> Shamusworld >> Repos - architektonas/blobdiff - src/vector.cpp
Initial work on BlockWidget.
[architektonas] / src / vector.cpp
index 58228ca39f75a7cfe9bb1b834dd8f19af4d24bf0..e992bbffd53aa5496bffde85c0ff6b543f4891fd 100644 (file)
@@ -1,7 +1,7 @@
 //\r
 // vector.cpp: Various structures used for 3 dimensional imaging\r
 //\r
-// by James L. Hammons\r
+// by James Hammons\r
 // (C) 2006 Underground Software\r
 //\r
 // JLH = James L. Hammons <jlhamm@acm.org>\r
@@ -151,6 +151,17 @@ Vector& Vector::operator-=(double const v)
        return *this;\r
 }\r
 \r
+// Check for equality\r
+bool Vector::operator==(Vector const v)\r
+{\r
+       return (x == v.x && y == v.y && z == v.z ? true : false);\r
+}\r
+\r
+// Check for inequality\r
+bool Vector::operator!=(Vector const v)\r
+{\r
+       return (x != v.x || y != v.y || z != v.z ? true : false);\r
+}\r
 \r
 Vector Vector::Unit(void)\r
 {\r