List of utility methods to do Linear Interpolate
double | LinearInterp(double n0, double n1, double a) Performs linear interpolation between two values return (1.0 - a) * n0 + (a * n1);
|
double | linearInterp(double xa, double ya, double xb, double yb, double x) solves the equation (yb-ya)/(xb-xa) = (y-ya)/(x-xa) for y given x. if (x == xa) { return ya; if (x == xb) { return yb; return (yb - ya) * (x - xa) / (xb - xa) + ya; |
double | linearInterp(long firstPoint, long lastPoint, int numValues, long currentPoint) linear Interp return (currentPoint - firstPoint) / (double) (lastPoint - firstPoint) * (numValues - 1); |
double | linearInterpolate(double v0, double v1, double t) linear Interpolate return (1 - t) * v0 + t * v1;
|
double | linearInterpolate(double v1, double v2, double amount) Do a linear interpolation between two values. return (v2 - v1) * amount + v1;
|
double[] | linearInterpolate(double[] x) linear Interpolate int n = x.length; double[] intered = new double[n]; for (int i = 0; i < n; i++) { intered[i] = x[i]; double ref = x[0]; int idx_ref = 0; double incre = 0; ... |
float | linearInterpolate(float y1, float y2, float mu) interpolates linear between two values return (y1 * (1 - mu) + y2 * mu);
|
double | linearInterpolation(double min, double max, double factor) linear Interpolation double cappedFactor = cap(factor, 0.0, 1.0); return min + (max - min) * cappedFactor; |
double | linearInterpolation(double x, double x1, double x2, double y1, double y2) Method returns a linearly interpolated value return (x1 == x2) ? 0.0 : (y1 + (x - x1) * (y2 - y1) / (x2 - x1));
|
double | linearInterpolation(double x0, double y0, double x1, double y1, double x) The linear interpolant is the straight line between these points return y0 + ((y1 - y0) / (x1 - x0)) * (x - x0);
|