From e03683852cac9b31ca846fcf13ff53abf99232c7 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sat, 27 Feb 2021 17:40:26 -0500 Subject: Added A* pathfinding --- src/vector.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/vector.h') 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: return (x() != other.x()) || (y() != other.y()); } + bool operator<(const vec2& other) const { + return std::tie(x(), y()) < std::tie(other.x(), other.y()); + } + }; using vec2i = vec2; -- cgit 1.4.1