2D Axis-aligned bounding box.
Rect2 consists of a position, a size, and several utility functions. It is typically used for fast overlap tests.
https://docs.godotengine.org/en/3.1/tutorials/math/index.html
Constructs a [code]Rect2[/code] by position and size.
Constructs a [code]Rect2[/code] by x, y, width, and height.
Returns a [code]Rect2[/code] 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.
Returns the intersection of this [code]Rect2[/code] and b.
Returns [code]true[/code] if this [code]Rect2[/code] completely encloses another one.
Returns this [code]Rect2[/code] expanded to include a given point.
Returns the area of the [code]Rect2[/code].
Returns a copy of the [code]Rect2[/code] grown a given amount of units towards all the sides.
Returns a copy of the [code]Rect2[/code] grown a given amount of units towards each direction individually.
Returns a copy of the [code]Rect2[/code] grown a given amount of units towards the [enum Margin] direction.
Returns [code]true[/code] if the [code]Rect2[/code] is flat or empty.
Returns [code]true[/code] if the [code]Rect2[/code] contains a point.
Returns [code]true[/code] if the [code]Rect2[/code] overlaps with another.
Returns a larger Rect2 that contains this Rect2 and [code]b[/code].
Ending corner.
Position (starting corner).
Size from position to end.