From 2103ce38edb160b2cc982b341535e1f147e66360 Mon Sep 17 00:00:00 2001 From: untodesu Date: Fri, 26 Dec 2025 22:11:55 +0500 Subject: Pixel scaling and collision jank fixes --- src/core/math/aabb.hh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/core/math/aabb.hh') diff --git a/src/core/math/aabb.hh b/src/core/math/aabb.hh index a235a9b..f3eb7bd 100644 --- a/src/core/math/aabb.hh +++ b/src/core/math/aabb.hh @@ -59,9 +59,9 @@ template constexpr bool math::AABB::contains(const vector_type& point) const { auto result = true; - result = result && (point.x >= min.x) && (point.x <= max.x); - result = result && (point.y >= min.y) && (point.y <= max.y); - result = result && (point.z >= min.z) && (point.z <= max.z); + result = result && (point.x > min.x) && (point.x < max.x); + result = result && (point.y > min.y) && (point.y < max.y); + result = result && (point.z > min.z) && (point.z < max.z); return result; } @@ -69,9 +69,9 @@ template constexpr bool math::AABB::intersect(const AABB& other_box) const { auto result = true; - result = result && (min.x <= other_box.max.x) && (max.x >= other_box.min.x); - result = result && (min.y <= other_box.max.y) && (max.y >= other_box.min.y); - result = result && (min.z <= other_box.max.z) && (max.z >= other_box.min.z); + result = result && (min.x < other_box.max.x) && (max.x > other_box.min.x); + result = result && (min.y < other_box.max.y) && (max.y > other_box.min.y); + result = result && (min.z < other_box.max.z) && (max.z > other_box.min.z); return result; } -- cgit