diff options
Diffstat (limited to 'src/vector.h')
| -rw-r--r-- | src/vector.h | 4 |
1 files changed, 4 insertions, 0 deletions
| diff --git a/src/vector.h b/src/vector.h index 9f6d54f..c7b58dc 100644 --- a/src/vector.h +++ b/src/vector.h | |||
| @@ -109,6 +109,10 @@ public: | |||
| 109 | return (x() != other.x()) || (y() != other.y()); | 109 | return (x() != other.x()) || (y() != other.y()); |
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | bool operator<(const vec2& other) const { | ||
| 113 | return std::tie(x(), y()) < std::tie(other.x(), other.y()); | ||
| 114 | } | ||
| 115 | |||
| 112 | }; | 116 | }; |
| 113 | 117 | ||
| 114 | using vec2i = vec2<int>; | 118 | using vec2i = vec2<int>; |
