def time_to_float(hour, minute):
    """
    Convert time to float number
    :param hour:
    :param minute:
    :return:
    """
    if not isinstance(hour, float):
        hour = float(hour)
    if not isinstance(minute, float):
        minute = float(minute)
    minute = minute * 1 / 60
    if hour > 0:
        return hour + minute
    else:
        return hour - minute