diff --git a/include/Nazara/Math/Box.inl b/include/Nazara/Math/Box.inl index b7873d064..58904abc3 100644 --- a/include/Nazara/Math/Box.inl +++ b/include/Nazara/Math/Box.inl @@ -56,9 +56,9 @@ NzBox::NzBox(const NzBox& box) template bool NzBox::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 diff --git a/include/Nazara/Math/Rect.inl b/include/Nazara/Math/Rect.inl index 9782ac69e..9fba791c0 100644 --- a/include/Nazara/Math/Rect.inl +++ b/include/Nazara/Math/Rect.inl @@ -50,8 +50,8 @@ NzRect::NzRect(const NzRect& rect) template bool NzRect::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