differenceAABB static method

AABB differenceAABB(
  1. AABB a,
  2. AABB b
)

Implementation

static AABB differenceAABB(AABB a, AABB b) {
  return AABB(
    Vec2(a.position.x - b.right, a.position.y - b.bottom),
    width: a.width + b.width,
    height: a.height + b.height,
  );
}