Skip to main content

Rect.Overlaps(Rect other, boolean allowInverse)

Returns true if the other rectangle overlaps this one. If allowInverse is present and true, the widths and heights of the Rects are allowed to take negative values (ie, the min value is greater than the max), and the test will still work.

Parameters:

NameTypeDescription
otherRectOther rectangle to test overlapping with.
allowInversebooleanDoes the test allow the widths and heights of the Rects to be negative?

Returns:

typeDescription
booleanTrue if the other rectangle overlaps this one

Usage

---@type Rect
local rect;

---@type Rect
local other;

---@type boolean
local allowInverse;


local val0 = rect.Overlaps(other, allowInverse)