Java Linear Interpolate linearInterpolation(double min, double max, double factor)

Here you can find the source of linearInterpolation(double min, double max, double factor)

Description

linear Interpolation

License

Open Source License

Declaration

public static double linearInterpolation(double min, double max, double factor) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static double linearInterpolation(double min, double max, double factor) {
        double cappedFactor = cap(factor, 0.0, 1.0);
        return min + (max - min) * cappedFactor;
    }//from  w ww.j  ava 2  s  .  c  om

    public static double cap(double value, double min, double max) {
        return Math.max(min, Math.min(value, max));
    }
}

Related

  1. linearInterp(long firstPoint, long lastPoint, int numValues, long currentPoint)
  2. linearInterpolate(double v0, double v1, double t)
  3. linearInterpolate(double v1, double v2, double amount)
  4. linearInterpolate(double[] x)
  5. linearInterpolate(float y1, float y2, float mu)
  6. linearInterpolation(double x, double x1, double x2, double y1, double y2)
  7. linearInterpolation(double x0, double y0, double x1, double y1, double x)
  8. linearInterpolation(double y2, double y1, double deltaX, double x1)
  9. LinearInterpolation(float a, float b, float f)