Java Utililty Methods Lerp

List of utility methods to do Lerp

  1. HOME
  2. Java
  3. L
  4. Lerp

Description

The list of methods to do Lerp are organized into topic(s).

Method

double lerp(double a, double b, double amt)
lerp
amt = clamp(amt, 1F, 0F);
return a * amt + b * (1D - amt);
double lerp(double a, double b, double f)
Interpolates between point a and point b
return a + f * (b - a);
double lerp(double a, double b, double lambda)
Perform a simple linear lerp between a and b
return a + lambda * (b - a);
double lerp(double a, double l, double h)
Interpolates a value within a range.
return l + a * (h - l);
double lerp(double amt, double start, double end)
lerp
if (amt <= 0.0D) {
 return start;
if (amt >= 1.0D) {
 return end;
return start + (end - start) * amt;
double lerp(double distance, double firstPoint, double secondPoint)
One dimensional linear interpolation.
return firstPoint + distance * (secondPoint - firstPoint);
double lerp(double from, double to, double p)
Linearly interpolates between two values.
assert p >= 0 && p <= 1 : "interpolation position out of range";
return from + (to - from) * p;
double lerp(double from, double to, double progress)
Linearly Interpolate between 'from' and 'to' at 'progress' position.
return from + ((to - from) * progress);
double lerp(double min, double max, double percentage)
lerp
return min + percentage * (max - min);
double lerp(double min, double max, double val)
Linear interpolation
return (1.0 - val) * min + val * max;


AltStyle によって変換されたページ (->オリジナル) /