mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-06-27 23:49:35 +01:00
Codefix: Rect::Contains did not consider the bottom/right edges as inside.
This commit is contained in:
parent
3235ec4cf8
commit
c14e4a6db1
@ -234,7 +234,7 @@ struct Rect {
|
||||
inline bool Contains(const Point &pt) const
|
||||
{
|
||||
/* This is a local version of IsInsideMM, to avoid including math_func everywhere. */
|
||||
return (uint)(pt.x - this->left) < (uint)(this->right - this->left) && (uint)(pt.y - this->top) < (uint)(this->bottom - this->top);
|
||||
return (uint)(pt.x - this->left) <= (uint)(this->right - this->left) && (uint)(pt.y - this->top) <= (uint)(this->bottom - this->top);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user