MCPcopy Create free account
hub / github.com/VCVRack/Rack / intersects

Method intersects

include/math.hpp:340–343  ·  view source on GitHub ↗

Returns whether this Rect overlaps with another Rect. Correctly handles infinite Rects. */

Source from the content-addressed store, hash-verified

338 Correctly handles infinite Rects.
339 */
340 bool intersects(Rect r) const {
341 return (r.size.x == INFINITY || pos.x < r.pos.x + r.size.x) && (size.x == INFINITY || r.pos.x < pos.x + size.x)
342 && (r.size.y == INFINITY || pos.y < r.pos.y + r.size.y) && (size.y == INFINITY || r.pos.y < pos.y + size.y);
343 }
344 bool equals(Rect r) const {
345 return pos.equals(r.pos) && size.equals(r.size);
346 }

Callers 5

drawMethod · 0.80
drawLayerMethod · 0.80
requestModulePosMethod · 0.80
requestSelectionPosMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected