Here you can find the source of lerp(int a, int b, int mul, int div)
public static int lerp(int a, int b, int mul, int div)
//package com.java2s; //License from project: Open Source License public class Main { public static int lerp(int a, int b, int mul, int div) { return a + (b - a) * mul / div; }//from w ww . j a v a 2 s.c o m }