Here you can find the source of linearInterpolate(float y1, float y2, float mu)
Parameter | Description |
---|---|
y1 | is the first value |
y2 | is the second value |
mu | is a value between 0 and 1 |
public static float linearInterpolate(float y1, float y2, float mu)
//package com.java2s; //License from project: Open Source License public class Main { /**//from w ww .j a v a 2 s . c o m * interpolates linear between two values * * @param y1 * is the first value * @param y2 * is the second value * @param mu * is a value between 0 and 1 * @return interpolated value * * @see http://local.wasp.uwa.edu.au/~pbourke/other/interpolation/ */ public static float linearInterpolate(float y1, float y2, float mu) { return (y1 * (1 - mu) + y2 * mu); } }