import math


def remap(in_value: int,
          in_minimum: int,
          in_maximum: int,
          out_minimum: int,
          out_maximum: int) -> int:
    """Remap a value from one value range to another value range
    while maintaining ratio"""
    new_value = (in_value - in_minimum) * (out_maximum - out_minimum) \
                / (in_maximum - in_minimum) + out_minimum
    return math.floor(new_value)