Class: Rect
Defined in: math/Rect.ts:4
A class representing a rectangle defined by an origin point and size.
Constructors
Constructor
new Rect(
origin,size):Rect
Defined in: math/Rect.ts:14
Constructs a new Rect instance.
Parameters
origin
The origin point of the rectangle.
size
The size of the rectangle.
Returns
Rect
Properties
origin
origin:
Vector2
Defined in: math/Rect.ts:6
The origin point (top-left corner) of the rectangle.
size
size:
Vector2
Defined in: math/Rect.ts:8
The size (width and height) of the rectangle.
Methods
containsPoint()
containsPoint(
point):boolean
Defined in: math/Rect.ts:23
Checks if a given point is inside the rectangle.
Parameters
point
The point to check.
Returns
boolean
True if the point is inside the rectangle, false otherwise.