Overview
Straight line interpolation will take a set of defined points (x, y values) and constructs a function such that between any two points {% (x_i,y_i) %} and {% (x_{i+!}, y_{i+1}) %}, the function draws a straight line.
Straight Line Interpolation Module
The following code utilizes the straight line interpolation library to find the interpolated point at 2.5.
let st = await import('/lib/approximation/interpolation/v1.0.0/straight.mjs');
let points = [[0,1],[1,1.5],[2,3],[3,4],[4,6]];
let int1 = st.interpolate(points, 2.5);
Try it!