This function normalizes the values in a vector to the range [new_min, new_max] based on their original range [old_min, old_max].
Useful links