Here you can find the source of lerp(float origin, float target, int steps, int maxSteps)
public static float lerp(float origin, float target, int steps, int maxSteps)
//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; } }