Rect
2D bounds such as UI margins and screen extents
Constructors
1 member Access: shared
Constructing 2D Bounding Rectangles
Lifecycle: Shared
A rect stores two corners and derives its width and height from them.
Luau
local minPoint = Vector2.new(10, 20)local maxPoint = Vector2.new(210, 120)local bounds = Rect.new(minPoint, maxPoint)local width = bounds.Widthlocal height = bounds.Heightprint(string.format("Rectangle dimensions: %d x %d", width, height))