Returns whether this Rect overlaps with another Rect. Correctly handles infinite Rects. */
| 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 | } |
no outgoing calls
no test coverage detected