1
0
Fork 0

Codefix: Rect::Contains did not consider the bottom/right edges as inside.

pull/14114/head
frosch 2025-04-25 17:19:17 +02:00
parent ce2155ab27
commit 0ff793aa77
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}
};