mirror of https://github.com/AxioDL/zeus.git
Fix CAABox::pointInside
This commit is contained in:
parent
b54121ed9c
commit
8a062453ef
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue