diff options
| author | untodesu <kirill@untode.su> | 2025-12-26 22:11:55 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2025-12-26 22:11:55 +0500 |
| commit | 2103ce38edb160b2cc982b341535e1f147e66360 (patch) | |
| tree | 00cc8fed00a9ed14dab6adf9bfc726d3821b745d /src/core/math | |
| parent | d5d01783c3b51a90d7f5283b5bb32d4e24105461 (diff) | |
| download | voxelius-2103ce38edb160b2cc982b341535e1f147e66360.tar.bz2 voxelius-2103ce38edb160b2cc982b341535e1f147e66360.zip | |
Pixel scaling and collision jank fixes
Diffstat (limited to 'src/core/math')
| -rw-r--r-- | src/core/math/aabb.hh | 12 |
1 files changed, 6 insertions, 6 deletions
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<math::arithmetic T> constexpr bool math::AABB<T>::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<math::arithmetic T> constexpr bool math::AABB<T>::intersect(const AABB<value_type>& 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; } |
