Linear or constant interpolation. Equivalent to R's approx().
approx()
The points interpolated at (xout, or the equally spaced points).
xout
The interpolated values, one per point of x.
x
approx([1, 2, 3], [10, 20, 40], { xout: [1.5, 2.5] }).y; // [15, 30] Copy
approx([1, 2, 3], [10, 20, 40], { xout: [1.5, 2.5] }).y; // [15, 30]
Linear or constant interpolation. Equivalent to R's
approx().