Here you can find the source of lerp(float value1, float value2, float amount)
Parameter | Description |
---|---|
value1 | a parameter |
value2 | a parameter |
amount | a value between 0 and 1. |
public static float lerp(float value1, float value2, float amount)
//package com.java2s; // file 'LICENSE', which is part of this source code package. public class Main { /**/*from w w w .j a v a 2s . co m*/ * Interpolates between value1 and value2 by amount. * @param value1 * @param value2 * @param amount a value between 0 and 1. * @return An interpolated value. */ public static float lerp(float value1, float value2, float amount) { return value1 + (value2 - value1) * amount; } }