List of utility methods to do interpolate
void | interpolate(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); |
float | interpolate(float a, float b, float d) interpolate return a + (b - a) * d;
|
float | interpolate(float bottom, float top, float ratio) interpolate return bottom + (top - bottom) * ratio;
|
int | interpolate(float firstColor, float secondColor, float stage, float maxStages) interpolate return (int) (firstColor + (secondColor - firstColor) * stage / maxStages); |
float | interpolate(float s, float e, float t) interpolate float t2 = (1.0f - fastCos(t * 3.14159265358979323f)) / 2.0f; return (s * (1.0f - t2) + (e) * t2); |
float | interpolate(float t, float a, float b) Does a linear interpolation. return a + t * (b - a);
|
float | interpolate(float var1, float var2, float var3) interpolate return var1 + (var2 - var1) * var3; |
int | interpolate(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; |
float | interpolate(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); |
int | interpolate(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)); |