diff options
-rw-r--r-- | vector.cpp | 4 | ||||
-rw-r--r-- | vector.h | 1 |
2 files changed, 5 insertions, 0 deletions
@@ -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; @@ -32,6 +32,7 @@ class Vector3 : public Vector2 { Vector3(const Vector3& v); Vector3(float x, float y, float z); bool operator==(const Vector3& v); + bool operator!=(const Vector3& v); Vector3& operator+=(const Vector3& v); Vector3 operator+(const Vector3& v); Vector3& operator-=(const Vector3& v); |