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

Method within

library/rect.h:19–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17 Vec2<T> p0, p1;
18
19 bool within(Vec2<T> p) const
20 {
21 return (p.x >= p0.x && p.x < p1.x && p.y >= p0.y && p.y < p1.y);
22 }
23 bool withinInclusive(Vec2<T> p) const
24 {
25 return (p.x >= p0.x && p.x <= p1.x && p.y >= p0.y && p.y <= p1.y);

Callers 15

initStateMethod · 0.80
fireAtBuildingMethod · 0.80
canAddEquipmentMethod · 0.80
addEquipmentMethod · 0.80
getEquipmentAtMethod · 0.80
canAddEquipmentMethod · 0.80
addEquipmentMethod · 0.80
getEquipmentAtMethod · 0.80
getSlotAtPositionFunction · 0.80
eventOccurredMethod · 0.80
tryPickUpItemMethod · 0.80
closeScreenMethod · 0.80

Calls

no outgoing calls

Tested by 2

test_point_withinFunction · 0.64
test_rect_withinFunction · 0.64