diff options
Diffstat (limited to 'src/vector.h')
-rw-r--r-- | src/vector.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/vector.h b/src/vector.h index 8019edf..9f6d54f 100644 --- a/src/vector.h +++ b/src/vector.h | |||
@@ -97,12 +97,16 @@ public: | |||
97 | return vec2(x() * other.x(), y() * other.y()); | 97 | return vec2(x() * other.x(), y() * other.y()); |
98 | } | 98 | } |
99 | 99 | ||
100 | vec2 operator/(const vec2& other) const { | ||
101 | return vec2(x() / other.x(), y() / other.y()); | ||
102 | } | ||
103 | |||
100 | bool operator==(const vec2& other) const { | 104 | bool operator==(const vec2& other) const { |
101 | return std::tie(x(), other.x()) == std::tie(y(), other.y()); | 105 | return (x() == other.x()) && (y() == other.y()); |
102 | } | 106 | } |
103 | 107 | ||
104 | bool operator!=(const vec2& other) const { | 108 | bool operator!=(const vec2& other) const { |
105 | return std::tie(x(), other.x()) != std::tie(y(), other.y()); | 109 | return (x() != other.x()) || (y() != other.y()); |
106 | } | 110 | } |
107 | 111 | ||
108 | }; | 112 | }; |