summaryrefslogtreecommitdiff
path: root/vector.cpp
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2011-06-13 13:16:44 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2011-06-13 13:16:44 +0200
commited2a562372f15a0bf0f60ac47f89fa11d331776e (patch)
treef7af259e19787bc20efcb59354809bec56dcb413 /vector.cpp
parente483f468085379a986cbc48bb13a7983315475cf (diff)
Added != operator to Vector3.
Diffstat (limited to 'vector.cpp')
-rw-r--r--vector.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/vector.cpp b/vector.cpp
index cf2c164..29fbdc7 100644
--- a/vector.cpp
+++ b/vector.cpp
@@ -83,6 +83,10 @@ bool Vector3::operator==(const Vector3& v) {
return x == v.x && y == v.y && z == v.z;
}
+bool Vector3::operator!=(const Vector3& v) {
+ return !(*this == v);
+}
+
Vector3& Vector3::operator+=(const Vector3& v) {
x += v.x;
y += v.y;