Skip to main content

Rect(Vector2 position, Vector2 size)

Creates a rectangle given a size and position.

Parameters:

NameTypeDescription
positionVector2The position of the minimum corner of the rect.
sizeVector2The width and height of the rect.

Usage

---@type Vector2
local position;

---@type Vector2
local size;


local rect = Rect(position, size);