Skip to content

Api > Rect > Constructor


Rect(Vector2 position, Vector2 size)⚓︎

Creates a rectangle given a size and position.

Parameters:⚓︎

Name Type Description
position Vector2 The position of the minimum corner of the rect.
size Vector2 The width and height of the rect.

Usage⚓︎

---@type Vector2
local position;

---@type Vector2
local size;


local rect = Rect(position, size);