Returns a [Rect2] with equivalent position and area, modified so that the top-left corner is the origin and [code]width[/code] and [code]height[/code] are positive.
</description>
</method>
<methodname="clip">
<returntype="Rect2"/>
<argumentindex="0"name="b"type="Rect2"/>
<description>
Returns the intersection of this [Rect2] and b.
</description>
</method>
<methodname="encloses">
<returntype="bool"/>
<argumentindex="0"name="b"type="Rect2"/>
<description>
Returns [code]true[/code] if this [Rect2] completely encloses another one.
</description>
</method>
<methodname="expand">
<returntype="Rect2"/>
<argumentindex="0"name="to"type="Vector2"/>
<description>
Returns a copy of this [Rect2] expanded to include a given point.
[b]Example:[/b]
[codeblock]
# position (-3, 2), size (1, 1)
var rect = Rect2(Vector2(-3, 2), Vector2(1, 1))
# position (-3, -1), size (3, 4), so we fit both rect and Vector2(0, -1)
var rect2 = rect.expand(Vector2(0, -1))
[/codeblock]
</description>
</method>
<methodname="get_area">
<returntype="float"/>
<description>
Returns the area of the [Rect2]. See also [method has_no_area].
</description>
</method>
<methodname="get_center">
<returntype="Vector2"/>
<description>
Returns the center of the [Rect2], which is equal to [member position] + ([member size] / 2).
</description>
</method>
<methodname="grow">
<returntype="Rect2"/>
<argumentindex="0"name="by"type="float"/>
<description>
Returns a copy of the [Rect2] grown a given amount of units towards all the sides.
</description>
</method>
<methodname="grow_individual">
<returntype="Rect2"/>
<argumentindex="0"name="left"type="float"/>
<argumentindex="1"name="top"type="float"/>
<argumentindex="2"name="right"type="float"/>
<argumentindex="3"name=" bottom"type="float"/>
<description>
Returns a copy of the [Rect2] grown a given amount of units towards each direction individually.
</description>
</method>
<methodname="grow_margin">
<returntype="Rect2"/>
<argumentindex="0"name="margin"type="int"/>
<argumentindex="1"name="by"type="float"/>
<description>
Returns a copy of the [Rect2] grown a given amount of units towards the [enum Margin] direction.
</description>
</method>
<methodname="has_no_area">
<returntype="bool"/>
<description>
Returns [code]true[/code] if the [Rect2] is flat or empty, [code]false[/code] otherwise. See also [method get_area].
[b]Note:[/b] If the [Rect2] has a negative size and is not flat or empty, [method has_no_area] will return [code]true[/code].
</description>
</method>
<methodname="has_point">
<returntype="bool"/>
<argumentindex="0"name="point"type="Vector2"/>
<description>
Returns [code]true[/code] if the [Rect2] contains a point. By convention, the right and bottom edges of the [Rect2] are considered exclusive, so points on these edges are [b]not[/b] included.
[b]Note:[/b] This method is not reliable for [Rect2] with a [i]negative size[/i]. Use [method abs] to get a positive sized equivalent rectangle to check for contained points.