Stay organized with collections
Save and categorize content based on your preferences.
blockly > utils > Rect > intersects
utils.Rect.intersects() method
Tests whether this rectangle intersects the provided rectangle. Assumes that the coordinate system increases going down and left.
Signature:
intersects(other: Rect): boolean;
Parameters
Parameter |
Type |
Description |
other |
Rect |
The other rectangle to check for intersection with. |
Returns:
boolean
Whether this rectangle intersects the provided rectangle.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["The `utils.Rect.intersects()` method determines if two rectangles overlap in a coordinate system where values increase downwards and leftwards."],["It accepts another `Rect` object as input to check for intersection with the current rectangle."],["The method returns `true` if the rectangles intersect, otherwise `false`."]]],[]]