MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / rectContains

Method rectContains

source/base/StarWorldGeometry.cpp:232–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230}
231
232bool WorldGeometry::rectContains(RectF const& rect, Vec2F const& pos) const {
233 auto wpos = xwrap(pos);
234 for (auto const& r : splitRect(rect)) {
235 if (r.contains(wpos))
236 return true;
237 }
238 return false;
239}
240
241bool WorldGeometry::rectIntersectsRect(RectF const& rect1, RectF const& rect2) const {
242 for (auto const& r1 : splitRect(rect1)) {

Callers 6

canReachEntityFunction · 0.80
inspectMethod · 0.80
entityQueryImplFunction · 0.80
swingMethod · 0.80
updateMethod · 0.80

Calls 1

containsMethod · 0.45

Tested by 1

inspectMethod · 0.64