diff options
Diffstat (limited to 'src/Math/AABB.hpp')
| -rw-r--r-- | src/Math/AABB.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Math/AABB.hpp b/src/Math/AABB.hpp index b298126..bff543e 100644 --- a/src/Math/AABB.hpp +++ b/src/Math/AABB.hpp @@ -27,15 +27,15 @@ struct AABB { } Bool intersects_on_x(AABB other) const { - return min.x() <= other.max.x() && max.x() >= other.min.x(); + return Math::floats_less(min.x(), other.max.x()) && Math::floats_less(other.min.x(), max.x()); } Bool intersects_on_y(AABB other) const { - return min.y() <= other.max.y() && max.y() >= other.min.y(); + return Math::floats_less(min.y(), other.max.y()) && Math::floats_less(other.min.y(), max.y()); } Bool intersects_on_z(AABB other) const { - return min.z() <= other.max.z() && max.z() >= other.min.z(); + return Math::floats_less(min.z(), other.max.z()) && Math::floats_less(other.min.z(), max.z()); } Bool collides(AABB other) const { |
