From 3504fd5080dbcfd0172299c5c6d13895e53ad163 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sat, 23 Feb 2019 12:15:46 -0500 Subject: Removed position caches There aren't going to be enough entities at once for position checking to ever really be a bottleneck, I don't think. Removing the caches makes the range logic a bit more intuitive, and it removes the possibility of accidentally not updating a cache when it needs to be. --- src/vector.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/vector.h') diff --git a/src/vector.h b/src/vector.h index 10fe4da..a94aea0 100644 --- a/src/vector.h +++ b/src/vector.h @@ -112,6 +112,11 @@ public: return vec2(x() * other.x(), y() * other.y()); } + constexpr bool operator==(const vec2& other) const + { + return (x() == other.x()) && (y() == other.y()); + } + }; using vec2s = vec2; -- cgit 1.4.1