MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / intersects

Method intersects

library/rect.h:31–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29 return (r.p0.x >= p0.x && r.p1.x <= p1.x && r.p0.y >= p0.y && r.p1.y <= p1.y);
30 }
31 bool intersects(Rect<T> r) const
32 {
33 return !(r.p1.x <= p0.x || r.p0.x >= p1.x || r.p1.y <= p0.y || r.p0.y >= p1.y);
34 }
35
36 T getWidth() const { return (this->p1.x - this->p0.x); }
37

Callers 3

canAddEquipmentMethod · 0.80
canAddEquipmentMethod · 0.80
test_rect_intersectsFunction · 0.80

Calls

no outgoing calls

Tested by 1

test_rect_intersectsFunction · 0.64