Open Asterune
Rect

Rect

Represents a two-dimensional axis-aligned rectangle.

Behavior

Rect represents a two-dimensional axis-aligned rectangle.

Summary

Constructors1
Functions1
  • Rect.new(…)

    Creates a rectangle from corner coordinates or minimum and maximum vectors.

Members6
Properties6

Constructors

new

Rect.new(…)

Creates a rectangle from corner coordinates or minimum and maximum vectors.

Properties

Center

Rect.Center: Vector2

The midpoint between the minimum and maximum corners.

Height

Rect.Height: number

The difference between the maximum and minimum Y coordinates.

Max

Rect.Max: Vector2

The maximum corner of the rectangle.

Min

Rect.Min: Vector2

The minimum corner of the rectangle.

Size

Rect.Size: Vector2

The width and height of the rectangle.

Width

Rect.Width: number

The difference between the maximum and minimum X coordinates.

Operators

__eq · __tostring · __type

Used by

ImageButton · ImageLabel