def remap_values(values, target_min=0.0, target_max=1.0, original_min=None, original_max=None):
    """
    Maps a list of numbers from one domain to another.
    If you do not specify a target domain 0.0-1.0 will be used.

    Parameters
    ----------
    val : list of int, list of long, list of float
        The value to remap
    original_min : int, long, float
        The minimun value of the original domain
    original_max : int, long, float
        The maximum value of the original domain
    target_min : int, long, float
        The minimun value of the target domain. Default 0.0
    target_max : int, long, float
        The maximum value of the target domain. Default 1.0

    Returns
    -------
    list
        The remaped list of values

    """
    if isinstance(values, list):

        if original_min is None:
            original_min = min(values)
        if original_max is None:
            original_max = max(values)

        original_range = original_max - original_min
        target_range = target_max - target_min
        ratio = target_range / original_range

        return [target_min + ((value - original_min) * ratio) for value in values]
    else:
        raise TypeError('Parameter val should be of type: list of int, list of float, list of long')