def angle_metric(t1, t2):
    """A metric for the distance between angles in the [-180, 180] range

    Parameters
    ----------
    t1 : float
        Theta one in degrees
    t2 : float
        Theta two in degrees

    Returns
    -------
    distance : float
        The distance between the two input angles in degrees
    """
    d = abs(t1 - t2)
    if d > 180:
        d = 360 - d
    return d
