2D Axis-aligned bounding box.
Rect2 provides an 2D Axis-Aligned Bounding Box. It consists of a position, a size, and several utility functions. It is typically used for fast overlap tests.
Construct a [Rect2] by position and size.
Construct a [Rect2] by x, y, width and height.
Returns the intersection of this [Rect2] and b.
Returns true if this [Rect2] completely encloses another one.
Return this [Rect2] expanded to include a given point.
Get the area of the [Rect2].
Return a copy of the [Rect2] grown a given amount of units towards all the sides.
Return true if the [Rect2] is flat or empty.
Return true if the [Rect2] contains a point.
Return true if the [Rect2] overlaps with another.
Combine this [Rect2] with another, a larger one is returned that contains both.
Ending corner.
Position (starting corner).
Size from position to end.