remap_values

compas.itertools.remap_values(values, target_min=0.0, target_max=1.0, original_min=None, original_max=None)[source]

Maps a list of numbers from one domain to another.

Parameters:
valuessequence[int | float]

The value to remap

target_minint | float, optional

The minimun value of the target domain.

target_maxint | float, optional

The maximum value of the target domain.

original_minint | float, optional

The minimun value of the original domain, other than the actual minimum value.

original_maxint | float, optional

The maximum value of the original domain, other than the actual maximum value.

Returns:
list[float]

The remaped list of values.