diff --git a/include/zeus/CAABox.hpp b/include/zeus/CAABox.hpp index 8f48d28..79c083d 100644 --- a/include/zeus/CAABox.hpp +++ b/include/zeus/CAABox.hpp @@ -259,8 +259,9 @@ public: inline bool pointInside(const CVector3f& other) const { - return (min.x <= other.x && other.x <= max.z && min.y <= other.y && other.y <= max.z && min.z <= other.z && - other.z <= max.z); + return (min.x <= other.x && other.x <= max.x && + min.y <= other.y && other.y <= max.y && + min.z <= other.z && other.z <= max.z); } inline CVector3f closestPointAlongVector(const CVector3f& other) const diff --git a/include/zeus/CVector3d.hpp b/include/zeus/CVector3d.hpp index af6986b..5f0b8d6 100644 --- a/include/zeus/CVector3d.hpp +++ b/include/zeus/CVector3d.hpp @@ -106,7 +106,9 @@ public: double magnitude() const { return sqrt(magSquared()); } inline CVector3d cross(const CVector3d& rhs) const { - return {y * rhs.z - z * rhs.y, z * rhs.x - x * rhs.z, x * rhs.y - y * rhs.x}; + return {y * rhs.z - z * rhs.y, + z * rhs.x - x * rhs.z, + x * rhs.y - y * rhs.x}; } double dot(const CVector3d& rhs) const