def mapValue(value, in_min, in_max, out_min, out_max):
    """
    Returns a new value mapped in a desired range.

    Parameters:
        value: value to be mapped
        in_min - in_max: limits of the range where the value is
        out_min - out_max: limits of the range where the value will be mapped
    """
    
    return (value - in_min) * (out_max - out_min) / (in_max - in_min) + out_min