summary refs log tree commit diff stats
path: root/src/vector.h
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2019-02-23 12:15:46 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2019-02-23 12:15:46 -0500
commit3504fd5080dbcfd0172299c5c6d13895e53ad163 (patch)
treecaab8e868566262b3aa4d80aa6a06cdf13e7c21d /src/vector.h
parent15b511e694f976686fdec1fb9f959f8a92f3b594 (diff)
downloaddispatcher-3504fd5080dbcfd0172299c5c6d13895e53ad163.tar.gz
dispatcher-3504fd5080dbcfd0172299c5c6d13895e53ad163.tar.bz2
dispatcher-3504fd5080dbcfd0172299c5c6d13895e53ad163.zip
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.
Diffstat (limited to 'src/vector.h')
-rw-r--r--src/vector.h5
1 files changed, 5 insertions, 0 deletions
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:
112 return vec2(x() * other.x(), y() * other.y()); 112 return vec2(x() * other.x(), y() * other.y());
113 } 113 }
114 114
115 constexpr bool operator==(const vec2& other) const
116 {
117 return (x() == other.x()) && (y() == other.y());
118 }
119
115}; 120};
116 121
117using vec2s = vec2<size_t>; 122using vec2s = vec2<size_t>;