Fix CAABox::pointInside

This commit is contained in:
Jack Andersen 2018-06-23 13:08:10 -10:00
parent b54121ed9c
commit 8a062453ef
2 changed files with 6 additions and 3 deletions

View File

@ -259,8 +259,9 @@ public:
inline bool pointInside(const CVector3f& other) const 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 && return (min.x <= other.x && other.x <= max.x &&
other.z <= max.z); min.y <= other.y && other.y <= max.y &&
min.z <= other.z && other.z <= max.z);
} }
inline CVector3f closestPointAlongVector(const CVector3f& other) const inline CVector3f closestPointAlongVector(const CVector3f& other) const

View File

@ -106,7 +106,9 @@ public:
double magnitude() const { return sqrt(magSquared()); } double magnitude() const { return sqrt(magSquared()); }
inline CVector3d cross(const CVector3d& rhs) const 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 double dot(const CVector3d& rhs) const