def get_closest_corner(orientation, corners_distance):
    """
    Function to call to know which corner to rescale for a given orientation
    And the value to use

    Args:
        - (float) current orientation for a depth map to rescale
        - (dict of tuples 2 values) format orientation: (top left, top right)
    Return:
        - (bool) is_left true if left, false if right
        - (float) value for the rescale
    """
    is_left = True

    closest_orientation = min(corners_distance.keys(),
                              key=lambda x: abs(x-orientation))

    if closest_orientation < orientation:
        is_left = False

    return is_left, corners_distance[closest_orientation][is_left]