def angle_difference(angle1: float, angle2: float) -> float:
    """The difference of two angle values.

    Args:
        angle1, angle2:
            The values are expected in degrees.
    Returns:
        Value in the range [-180.0, 180.0]"""
    return (abs(angle1 - angle2) + 180) % 360 - 180