combine method

void combine(
  1. AABB aabb
)

Combines another aabb with this one

Implementation

void combine(AABB aabb) {
  lowerBound.x =
      lowerBound.x < aabb.lowerBound.x ? lowerBound.x : aabb.lowerBound.x;
  lowerBound.y =
      lowerBound.y < aabb.lowerBound.y ? lowerBound.y : aabb.lowerBound.y;
  upperBound.x =
      upperBound.x > aabb.upperBound.x ? upperBound.x : aabb.upperBound.x;
  upperBound.y =
      upperBound.y > aabb.upperBound.y ? upperBound.y : aabb.upperBound.y;
}