|
@@ -56,7 +56,14 @@
|
|
<return type="Rect2" />
|
|
<return type="Rect2" />
|
|
<argument index="0" name="to" type="Vector2" />
|
|
<argument index="0" name="to" type="Vector2" />
|
|
<description>
|
|
<description>
|
|
- Returns this [Rect2] expanded to include a given point.
|
|
|
|
|
|
+ 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>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
<method name="get_area">
|
|
<method name="get_area">
|
|
@@ -100,7 +107,8 @@
|
|
<return type="bool" />
|
|
<return type="bool" />
|
|
<argument index="0" name="point" type="Vector2" />
|
|
<argument index="0" name="point" type="Vector2" />
|
|
<description>
|
|
<description>
|
|
- Returns [code]true[/code] if the [Rect2] contains a point.
|
|
|
|
|
|
+ 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.
|
|
</description>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
<method name="intersects">
|
|
<method name="intersects">
|