Java interpolate interpolate(double x1, double x2, double inbetween)

Here you can find the source of interpolate(double x1, double x2, double inbetween)

Description

interpolate

License

Open Source License

Declaration

public static double interpolate(double x1, double x2, double inbetween) 

Method Source Code

//package com.java2s;

public class Main {
    public static double interpolate(double x1, double x2, double inbetween) {
        return x1 + (x2 - x1) * inbetween;
    }/*from  w  w  w .j  a v a 2  s.c o m*/

    public static float interpolate(float x1, float x2, float inbetween) {
        return x1 + (x2 - x1) * inbetween;
    }

    public static int interpolate(int x1, int x2, double inbetween) {
        return (int) (x1 + (x2 - x1) * inbetween);
    }
}

Related

  1. interpolate(double a, double b, double d)
  2. interpolate(double fromAngle, double toAngle, double ratio)
  3. interpolate(double oldP, double newP, float partialTicks)
  4. interpolate(double p0, double p1, double p2, double p3, double t)
  5. interpolate(double x, double x1, double y1, double x2, double y2)
  6. interpolate(double x1, double x2, float zeroToOne)
  7. interpolate(final double min, final double max, final int currentClass, final int numOfClasses)
  8. interpolate(final float prev, final float curr, final float alpha)
  9. interpolate(final int n, final int lastN, final float interpolation)