Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Should an AABB "contain" a point when the point is:

  • Exclusive: Only exactly inside the aabb

  • Inclusive: Inside the aabb or exactly on the sides

  • Almost: Inside the aabb or a little bit outside of the sides


share|improve this question
up vote 4 down vote accepted

Ultimately, it comes down to what you commonly check. To bring up a 4th alternative, I've used half-open intervals, so points belong to exactly one bounding box at a tight boundary.

bb.minX <= point.x < bb.maxX
share|improve this answer

Inclusive, because when setting up containing boxes, if an object passes over the line it will be checked twice where your other methods would, and could easily not check a collision, or check too many and do a lot of extra work.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.