/ Published in: C#
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
static double interpolate( double x0, double y0, double x1, double y1, double x ) { return y0*(x - x1)/(x0 - x1) + y1*(x - x0)/(x1 - x0); }