Skip to main content

linear_interp

Function linear_interp 

Source
pub fn linear_interp(x0: f64, y0: f64, x1: f64, y1: f64, x: f64) -> f64
Expand description

Linear interpolation between two points.

§Arguments

  • x0, y0 - First point
  • x1, y1 - Second point
  • x - Point to interpolate at

§Returns

Interpolated y value at x