pub fn interpolate( x: f32, x_min: f32, x_max: f32, y_min: f32, y_max: f32, ) -> f32
Interpolate the value x, assuming that it lies within the range x_min and x_max, to the range y_min and y_max.
x
x_min
x_max
y_min
y_max