Revert change to CAABox closestPointAlongVector / furthestPointAlongVector

This commit is contained in:
Luke Street 2022-03-20 16:22:06 -04:00
parent 11606d3676
commit f3e649716a
1 changed files with 4 additions and 4 deletions

View File

@ -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 {