MCPcopy Create free account
hub / github.com/ByteArena/box2d / B2TestOverlapBoundingBoxes

Function B2TestOverlapBoundingBoxes

CollisionB2Collision.go:246–260  ·  view source on GitHub ↗
(a, b B2AABB)

Source from the content-addressed store, hash-verified

244}
245
246func B2TestOverlapBoundingBoxes(a, b B2AABB) bool {
247
248 d1 := B2Vec2Sub(b.LowerBound, a.UpperBound)
249 d2 := B2Vec2Sub(a.LowerBound, b.UpperBound)
250
251 if d1.X > 0.0 || d1.Y > 0.0 {
252 return false
253 }
254
255 if d2.X > 0.0 || d2.Y > 0.0 {
256 return false
257 }
258
259 return true
260}
261
262///////////////////////////////////////////////////////////////////////////////
263///////////////////////////////////////////////////////////////////////////////

Callers 3

QueryMethod · 0.85
RayCastMethod · 0.85
TestOverlapMethod · 0.85

Calls 1

B2Vec2SubFunction · 0.85

Tested by

no test coverage detected