A utility function to scale vectors to specific intervals.

scale_to_int(x, min, max)

Arguments

x

vector to be scaled

min

minimum value of the new interval

max

maximum value of the new interval