No problems
No problems found in Rect, Sphere, Vector2, Vector3 and Vector4 Former-commit-id: 6688608a2beaa9cf5328daf7e5108b6cfebd843d
This commit is contained in:
@@ -64,7 +64,7 @@ template<typename T>
|
||||
bool NzRect<T>::Contains(const NzRect<T>& rect) const
|
||||
{
|
||||
return Contains(rect.x, rect.y) &&
|
||||
Contains(rect.x + rect.width, rect.y + rect.height);
|
||||
Contains(rect.x + rect.width, rect.y + rect.height);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
@@ -410,7 +410,7 @@ template<typename T>
|
||||
bool NzRect<T>::operator==(const NzRect& rect) const
|
||||
{
|
||||
return NzNumberEquals(x, rect.x) && NzNumberEquals(y, rect.y) &&
|
||||
NzNumberEquals(width, rect.width) && NzNumberEquals(height, rect.height);
|
||||
NzNumberEquals(width, rect.width) && NzNumberEquals(height, rect.height);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
||||
@@ -51,13 +51,13 @@ bool NzSphere<T>::Contains(T X, T Y, T Z) const
|
||||
template<typename T>
|
||||
bool NzSphere<T>::Contains(const NzBox<T>& box) const
|
||||
{
|
||||
if (box.GetMinimum().SquaredDistance(GetPosition()) <= radius * radius)
|
||||
{
|
||||
if (box.GetMaximum().SquaredDistance(GetPosition()) <= radius * radius)
|
||||
return true;
|
||||
}
|
||||
if (box.GetMinimum().SquaredDistance(GetPosition()) <= radius * radius)
|
||||
{
|
||||
if (box.GetMaximum().SquaredDistance(GetPosition()) <= radius * radius)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
template<typename T>
|
||||
bool NzSphere<T>::Contains(const NzVector3<T>& point) const
|
||||
@@ -156,7 +156,7 @@ bool NzSphere<T>::Intersect(const NzBox<T>& box) const
|
||||
squaredDistance += diff*diff;
|
||||
}
|
||||
|
||||
return squaredDistance <= radius * radius;
|
||||
return squaredDistance <= radius * radius;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
||||
Reference in New Issue
Block a user