remap_values
- compas.utilities.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. If you do not specify a target domain 0.0-1.0 will be used.
- Parameters
values (list of int or float) – The value to remap
original_min (int or float) – The minimun value of the original domain
original_max (int or float) – The maximum value of the original domain
target_min (int or float) – The minimun value of the target domain. Default 0.0
target_max (int or float) – The maximum value of the target domain. Default 1.0
- Returns
list – The remaped list of values
Examples
>>>