Java Lerp lerp(float origin, float target, int steps, int maxSteps)

Here you can find the source of lerp(float origin, float target, int steps, int maxSteps)

Description

lerp

License

Open Source License

Declaration

public static float lerp(float origin, float target, int steps, int maxSteps) 

Method Source Code

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

public class Main {
    public static float lerp(float origin, float target, int steps, int maxSteps) {
        return origin + (target - origin) * steps / maxSteps;
    }//from ww w.  ja v a 2  s  .  co m

    public static double lerp(double origin, double target, int steps, int maxSteps) {
        return origin + (target - origin) * steps / maxSteps;
    }
}

Related

  1. lerp(final float x, final float x1, final float x2, final float q00, final float q01)
  2. lerp(float a, float b, float f)
  3. lerp(float a, float b, float interpolation)
  4. lerp(float a, float b, float t)
  5. lerp(float fromValue, float toValue, float progress)
  6. lerp(float start, float stop, float amt)
  7. lerp(float target, float current, float factor)
  8. lerp(float to, float from, float f)
  9. lerp(float va, float vb, float t)