From f3e649716af215157b1d64a0f25de8e1d7f185fa Mon Sep 17 00:00:00 2001 From: Luke Street Date: Sun, 20 Mar 2022 16:22:06 -0400 Subject: [PATCH] Revert change to CAABox closestPointAlongVector / furthestPointAlongVector --- include/zeus/CAABox.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/zeus/CAABox.hpp b/include/zeus/CAABox.hpp index ee66768..b805ea5 100644 --- a/include/zeus/CAABox.hpp +++ b/include/zeus/CAABox.hpp @@ -164,13 +164,13 @@ public: } [[nodiscard]] CVector3f closestPointAlongVector(const CVector3f& other) const { - return {(other.x() > 0.f ? min.x() : max.x()), (other.y() > 0.f ? min.y() : max.y()), - (other.z() > 0.f ? min.z() : max.z())}; + return {(other.x() >= 0.f ? min.x() : max.x()), (other.y() >= 0.f ? min.y() : max.y()), + (other.z() >= 0.f ? min.z() : max.z())}; } [[nodiscard]] CVector3f furthestPointAlongVector(const CVector3f& other) const { - return {(other.x() > 0.f ? max.x() : min.x()), (other.y() > 0.f ? max.y() : min.y()), - (other.z() > 0.f ? max.z() : min.z())}; + return {(other.x() >= 0.f ? max.x() : min.x()), (other.y() >= 0.f ? max.y() : min.y()), + (other.z() >= 0.f ? max.z() : min.z())}; } [[nodiscard]] float distanceBetween(const CAABox& other) const {