Java Lerp lerp(float start, float stop, float amt)

Here you can find the source of lerp(float start, float stop, float amt)

Description

Calculates a number between two numbers at a specific increment.

License

Open Source License

Declaration

public static final float lerp(float start, float stop, float amt) 

Method Source Code

//package com.java2s;
/**************************************************************************************
 * util_tree/*from w  w  w .  ja  va2  s .  co  m*/
 * Copyright (c) 2014-2017 National University of Colombia, https://github.com/remixlab
 * @author Jean Pierre Charalambos, http://otrolado.info/
 *
 * All rights reserved. Library that eases the creation of interactive
 * scenes, released under the terms of the GNU Public License v3.0
 * which is available at http://www.gnu.org/licenses/gpl.html
 **************************************************************************************/

public class Main {
    /**
     * Calculates a number between two numbers at a specific increment. The {@code amt}
     * parameter is the amount to interpolate between the two values where 0.0 equal to the
     * first point, 0.1 is very near the first point, 0.5 is half-way in between, etc.
     */
    public static final float lerp(float start, float stop, float amt) {
        return start + (stop - start) * amt;
    }
}

Related

  1. lerp(float a, float b, float f)
  2. lerp(float a, float b, float interpolation)
  3. lerp(float a, float b, float t)
  4. lerp(float fromValue, float toValue, float progress)
  5. lerp(float origin, float target, int steps, int maxSteps)
  6. lerp(float target, float current, float factor)
  7. lerp(float to, float from, float f)
  8. lerp(float va, float vb, float t)
  9. lerp(float value1, float value2, float amount)