Fix CAABox::intersects

This commit is contained in:
Phillip Stephens 2018-06-04 12:13:02 -07:00
parent 6fbebe0eb7
commit d9e88babe2
1 changed files with 6 additions and 6 deletions

View File

@ -94,12 +94,12 @@ public:
inline bool intersects(const CAABox& other) const inline bool intersects(const CAABox& other) const
{ {
bool x1 = (max[0] > other.min[0]); bool x1 = (max[0] >= other.min[0]);
bool x2 = (min[0] < other.max[0]); bool x2 = (min[0] <= other.max[0]);
bool y1 = (max[1] > other.min[1]); bool y1 = (max[1] >= other.min[1]);
bool y2 = (min[1] < other.max[1]); bool y2 = (min[1] <= other.max[1]);
bool z1 = (max[2] > other.min[2]); bool z1 = (max[2] >= other.min[2]);
bool z2 = (min[2] < other.max[2]); bool z2 = (min[2] <= other.max[2]);
return x1 && x2 && y1 && y2 && z1 && z2; return x1 && x2 && y1 && y2 && z1 && z2;
} }