interpolate

Function interpolate 

Source
pub fn interpolate(
    x: f32,
    x_min: f32,
    x_max: f32,
    y_min: f32,
    y_max: f32,
) -> f32
Expand description

Linearly interpolate the value x, assuming that it lies within the range x_min and x_max, to the range y_min and y_max.