mapCoordinatesToValue function

Map arbitrary numeric vector to a given range of values.