Here you can find the source of lerp(double a, double b, double lambda)
Parameter | Description |
---|---|
a | a parameter |
b | a parameter |
lambda | The weight of b |
public static double lerp(double a, double b, double lambda)
//package com.java2s; /**/* w w w .j av a 2 s .co m*/ * Copyright (c) Lambda Innovation, 2013-2016 * This file is part of LambdaLib modding library. * https://github.com/LambdaInnovation/LambdaLib * Licensed under MIT, see project root for more information. */ public class Main { /** * Perform a simple linear lerp between a and b * @param a * @param b * @param lambda The weight of b * @return The lerp value */ public static double lerp(double a, double b, double lambda) { return a + lambda * (b - a); } }