def get_overlap(x0, xd, y0, yd):
    """Return the min edge and width of overlap.

    Parameters
    ----------
    x0, y0 : float
        The min values of the ranges
    xd, yd : float
        The widths of the ranges

    Returns
    -------
    lo : float
        The min value of the overlap region
    width : float
        The width of the overlap region. May be zero if ranges share an edge.

    """
    lo = max(x0, y0)
    width = min(x0 + xd, y0 + yd) - lo
    assert width >= 0, "These two ranges don't actually overlap"
    return lo, width