def aa_rect_distance_aa_rect(aa_rect, other):
    d = max((abs(aa_rect.center[0] - other.center[0]) - aa_rect.rx - other.rx,
             abs(aa_rect.center[1] - other.center[1]) - aa_rect.ry - other.ry))
    if d < 0.0:
        d = 0.0
    return d

# CollisionManager implementations #######################################
Give the distance between two axis-aligned rectangles.
dataset/ETHPy150Open los-cocos/cocos/cocos/collision_model.py/aa_rect_distance_aa_rect