(Box|Rect) Fixed Contains method excluding edge vectors
Former-commit-id: f3281ad9f7af268fceccfdb9d4f67ac0ac76b445
This commit is contained in:
parent
efa75ba349
commit
0363a1a8fa
|
|
@ -56,9 +56,9 @@ NzBox<T>::NzBox(const NzBox<U>& box)
|
|||
template<typename T>
|
||||
bool NzBox<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;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
|
|
|||
|
|
@ -50,8 +50,8 @@ NzRect<T>::NzRect(const NzRect<U>& rect)
|
|||
template<typename T>
|
||||
bool NzRect<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;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
|
|
|||
Loading…
Reference in New Issue