def radius_cmp(a, b, offsets):
    '''return +1 or -1 for for sorting'''
    diff = radius(a, offsets) - radius(b, offsets)
    if diff > 0:
        return 1
    if diff < 0:
        return -1
    return 0