Java Lerp lerp(int a, int b, float value)

Here you can find the source of lerp(int a, int b, float value)

Description

lerp

License

Apache License

Declaration

public static int lerp(int a, int b, float value) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static int lerp(int a, int b, float value) {
        return (int) (a + (b - a) * value);
    }//from w  w w .jav a2s .  c  om

    public static long lerp(long a, long b, float value) {
        return (long) (a + (b - a) * value);
    }

    public static float lerp(float a, float b, float value) {
        return a + (b - a) * value;
    }

    public static double lerp(double a, double b, double value) {
        return a + (b - a) * value;
    }
}

Related

  1. lerp(float start, float stop, float amt)
  2. lerp(float target, float current, float factor)
  3. lerp(float to, float from, float f)
  4. lerp(float va, float vb, float t)
  5. lerp(float value1, float value2, float amount)
  6. lerp(int a, int b, int mul, int div)
  7. lerpa(double a1, double a2, double t)
  8. lerpAndPremultiplyColorWithAlpha(float t, int[] color1, int[] color2)
  9. lerpAngle(float fromRadians, float toRadians, float progress)