from typing import Union
from typing import Tuple


def map_value_to_range(
        input_value: Union[int, float],
        input_range: Tuple[Union[int, float], Union[int, float]],
        output_range: Tuple[Union[int, float], Union[int, float]]):
    """Scales the input value proportionately to match the output range."""
    input_spread = input_range[1] - input_range[0]
    output_spread = output_range[1] - output_range[0]

    value_scaled = float(input_value - input_range[0]) / float(input_spread)

    return output_range[0] + (value_scaled * output_spread)