intersects
Whether two rectangles have an area in common, exactly when intersection returns a rectangle: rectangles that only touch do not, and neither does an empty (zero width or height) rectangle.
Available since v3.1.5
Import
Section titled “Import”Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
a | Rect | A rectangle |
b | Rect | Another rectangle |
Returns
Section titled “Returns”boolean — true if they have an area in common
Examples
Section titled “Examples”Is a layer on screen?
Section titled “Is a layer on screen?”True when the rectangles have an area in common.
Touching is not overlapping
Section titled “Touching is not overlapping”Adjacent rectangles do not intersect.
Related Types
Section titled “Related Types”An axis-aligned rectangle: its top-left corner and its size. Width and height are expected to be non-negative.
