Rect
Represents a two-dimensional axis-aligned rectangle.
Behavior
Rect represents a two-dimensional axis-aligned rectangle.
Summary
The midpoint between the minimum and maximum corners.
The difference between the maximum and minimum Y coordinates.
The maximum corner of the rectangle.
The minimum corner of the rectangle.
The width and height of the rectangle.
The difference between the maximum and minimum X coordinates.
Constructors
new
Rect.new(…)Creates a rectangle from corner coordinates or minimum and maximum vectors.
Properties
Center
Rect.Center: Vector2The midpoint between the minimum and maximum corners.
Height
Rect.Height: numberThe difference between the maximum and minimum Y coordinates.
Max
Rect.Max: Vector2The maximum corner of the rectangle.
Min
Rect.Min: Vector2The minimum corner of the rectangle.
Size
Rect.Size: Vector2The width and height of the rectangle.
Width
Rect.Width: numberThe difference between the maximum and minimum X coordinates.
Operators
__eq · __tostring · __type