expandAABB static method

AABB expandAABB(
  1. AABB moving,
  2. AABB target
)

Implementation

static AABB expandAABB(AABB moving, AABB target) {
  return AABB(
    Vec2(target.position.x - moving.width * 0.5, target.position.y - moving.height * 0.5),
    width: target.width + moving.width,
    height: target.height + moving.height,
  );
}