Java Lerp lerp(double a, double b, double lambda)

Here you can find the source of lerp(double a, double b, double lambda)

Description

Perform a simple linear lerp between a and b

License

MIT License

Parameter

Parameter Description
a a parameter
b a parameter
lambda The weight of b

Return

The lerp value

Declaration

public static double lerp(double a, double b, double lambda) 

Method Source Code

//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);
    }
}

Related

  1. lerp(double a, double b, double amt)
  2. lerp(double a, double b, double f)
  3. lerp(double a, double l, double h)
  4. lerp(double amt, double start, double end)
  5. lerp(double distance, double firstPoint, double secondPoint)
  6. lerp(double from, double to, double p)