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

voidinterpolate(final int x1, final double y1, final int x2, final double y2, final double... f)
interpolate
final double m = gradient(x1, y1, x2, y2); 
final double c = y1;
double y = c;
for (int x = x1 + 1; x < x2; ++x) {
    f[x] = (y += m); 
floatinterpolate(float a, float b, float d)
interpolate
return a + (b - a) * d;
floatinterpolate(float bottom, float top, float ratio)
interpolate
return bottom + (top - bottom) * ratio;
intinterpolate(float firstColor, float secondColor, float stage, float maxStages)
interpolate
return (int) (firstColor + (secondColor - firstColor) * stage / maxStages);
floatinterpolate(float s, float e, float t)
interpolate
float t2 = (1.0f - fastCos(t * 3.14159265358979323f)) / 2.0f;
return (s * (1.0f - t2) + (e) * t2);
floatinterpolate(float t, float a, float b)
Does a linear interpolation.
return a + t * (b - a);
floatinterpolate(float var1, float var2, float var3)
interpolate
return var1 + (var2 - var1) * var3;
intinterpolate(int a, int b, int theta, int reciprocal)
Interpolates two smooth noise values.
int cosine = 65536 - COSINE[theta * COSINE.length / (2 * reciprocal)] / 2;
return (a * (65536 - cosine)) / 65536 + (b * cosine) / 65536;
floatinterpolate(int i, int n, float u1, float u2, float du)
interpolate
if (i == 0) {
    return u1;
if (i == n) {
    return u2;
return (u1 + i * du); 
intinterpolate(int start, int end, int n, int i)
Get the color component that lies between the two color component points
return (int) ((float) start + ((((float) end - (float) start) / n) * i));