Java Utililty Methods interpolate

List of utility methods to do interpolate

Description

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

Method

intinterpolate(int v1, int v2, float f)
interpolate
return clamp((int) (v1 + f * (v2 - v1)));
intinterpolate(int v1, int v2, float f)
interpolate
return clamp((int) (v1 + f * (v2 - v1)));
Doubleinterpolate(Long t, Long t1, Double m1, Long t2, Double m2)
interpolate
if (m1 == null && m2 == null) {
    return null;
if (m1 == null)
    return m2;
if (m2 == null)
    return m1;
if (t1 == null || t2 == null)
...
doubleinterpolate(long x1, long x2, double y1, double y2, long x)
interpolate
return y1 + (y2 - y1) * (((double) (x - x1)) / ((double) (x2 - x1)));
Stringinterpolate(String input, String parameter, String value)
interpolate
return input.replaceAll("\\$\\{" + parameter + "\\}", value);
Stringinterpolate(String value)
interpolate
return value.replaceAll("\\$\\{HOME\\}", USER_HOME);
floatinterpolate2D(final float wi, final float wj, final float x00, final float x10, final float x01, final float x11)
Performs a fast linear interpolation in two dimensions i and j.
return x00 + wi * (x10 - x00) + wj * (x01 - x00) + wi * wj * (x11 + x00 - x01 - x10);
doubleinterpolateAngle(double oldAngle, double newAngle, double scale)
Interpolate between two angles.
while (newAngle - oldAngle > 360)
    newAngle -= 360;
while (newAngle - oldAngle < -360)
    newAngle += 360;
double result = oldAngle + (newAngle - oldAngle) * scale;
while (result < 0)
    result += 360;
while (result >= 360)
...
floatinterpolateAO(float a, float b, float c, float d)
interpolate AO
return (a + b + c + d) / 4F;
intinterpolateBrightness(int a, int b, int c, int d)
interpolate Brightness
if (a == 0)
    a = d;
if (b == 0)
    b = d;
if (c == 0)
    c = d;
return (a + b + c + d) >> 2 & 0xFF00FF;