From b0d4770710d129d58ecaa67f6ac11f2a02cad8d6 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 26 Feb 2024 17:38:02 +0100 Subject: fix a warning --- src/raycast.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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 p0, Math::Vector2 p1) constexpr auto half_bb = (max_bb_size + Math::Vector2{T{1}}) / T{2}; constexpr auto start = -half_bb, end = chunk_size + 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(Math::Vector2 p0, Math::Vector2 p1); -- cgit v1.2.3