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

Method contains

include/math.hpp:326–329  ·  view source on GitHub ↗

Returns whether this Rect contains a point, inclusive on the left/top, exclusive on the right/bottom. Correctly handles infinite Rects. */

Source from the content-addressed store, hash-verified

324 Correctly handles infinite Rects.
325 */
326 bool contains(Vec v) const {
327 return (pos.x <= v.x) && (size.x == INFINITY || v.x < pos.x + size.x)
328 && (pos.y <= v.y) && (size.y == INFINITY || v.y < pos.y + size.y);
329 }
330 /** Returns whether this Rect contains (is a superset of) a Rect.
331 Correctly handles infinite Rects.
332 */

Callers 3

drawMethod · 0.80
onHoverScrollMethod · 0.80
recursePositionEventMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected