mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:57:35 +00:00
LibGfx: Add Size::contains
This commit is contained in:
parent
8af02fc8b3
commit
a2bffc850a
1 changed files with 6 additions and 0 deletions
|
@ -68,6 +68,12 @@ public:
|
|||
void set_width(T w) { m_width = w; }
|
||||
void set_height(T h) { m_height = h; }
|
||||
|
||||
template<typename U>
|
||||
bool contains(const Size<U>& other) const
|
||||
{
|
||||
return other.m_width <= m_width && other.m_height <= m_height;
|
||||
}
|
||||
|
||||
bool operator==(const Size<T>& other) const
|
||||
{
|
||||
return m_width == other.m_width && m_height == other.m_height;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue