diff options
| author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2019-02-23 12:15:46 -0500 |
|---|---|---|
| committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2019-02-23 12:15:46 -0500 |
| commit | 3504fd5080dbcfd0172299c5c6d13895e53ad163 (patch) | |
| tree | caab8e868566262b3aa4d80aa6a06cdf13e7c21d /src/vector.h | |
| parent | 15b511e694f976686fdec1fb9f959f8a92f3b594 (diff) | |
| download | dispatcher-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.h | 5 |
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 | ||
| 117 | using vec2s = vec2<size_t>; | 122 | using vec2s = vec2<size_t>; |
