diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-02-26 17:38:02 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-02-26 18:04:44 +0100 |
commit | b0d4770710d129d58ecaa67f6ac11f2a02cad8d6 (patch) | |
tree | 892f97b4e782042e6108315192cff390a719346f /src | |
parent | 590f120ced72b37eb6fd85b89e33a9d4b11c6f2c (diff) |
fix a warning
Diffstat (limited to 'src')
-rw-r--r-- | src/raycast.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/raycast.cpp b/src/raycast.cpp index 598797eb..b4d64a85 100644 --- a/src/raycast.cpp +++ b/src/raycast.cpp @@ -104,8 +104,8 @@ constexpr bool within_chunk_bounds(Math::Vector2<T> p0, Math::Vector2<T> p1) constexpr auto half_bb = (max_bb_size + Math::Vector2{T{1}}) / T{2}; constexpr auto start = -half_bb, end = chunk_size<T> + half_bb; - return !(start.x() > p1.x() || end.x() < p0.x() || - start.y() > p1.y() || end.y() < p0.y()); + return start.x() <= p1.x() && end.x() >= p0.x() && + start.y() <= p1.y() && end.y() >= p0.y(); } template bool within_chunk_bounds<int>(Math::Vector2<int> p0, Math::Vector2<int> p1); |