Fix [Box|Rect]::Contains including outer border points
This commit is contained in:
@@ -133,9 +133,9 @@ namespace Nz
|
||||
template<typename T>
|
||||
bool Box<T>::Contains(T X, T Y, T Z) const
|
||||
{
|
||||
return X >= x && X <= x + width &&
|
||||
Y >= y && Y <= y + height &&
|
||||
Z >= z && Z <= z + depth;
|
||||
return X >= x && X < x + width &&
|
||||
Y >= y && Y < y + height &&
|
||||
Z >= z && Z < z + depth;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
@@ -117,8 +117,8 @@ namespace Nz
|
||||
template<typename T>
|
||||
bool Rect<T>::Contains(T X, T Y) const
|
||||
{
|
||||
return X >= x && X <= (x + width) &&
|
||||
Y >= y && Y <= (y + height);
|
||||
return X >= x && X < (x + width) &&
|
||||
Y >= y && Y < (y + height);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user