def mappingPad(value, v_min, v_max, new_min, new_max):
    """
    Given a value x defined in [v_min, v_max], it returns
    the value as if it was defined in [new_min, new_max]
    """
    value = value - v_min
    value = value * (new_max - new_min) / (v_max - v_min)
    value = value + new_min
    return value