Java Array Interpolate interpolateLinear(int[] v1, int[] v2, double t)

Here you can find the source of interpolateLinear(int[] v1, int[] v2, double t)

Description

interpolate Linear

License

Open Source License

Declaration

public static int[] interpolateLinear(int[] v1, int[] v2, double t) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static int[] interpolateLinear(int[] v1, int[] v2, double t) {
        int[] result = new int[v1.length];
        for (int i = 0; i < result.length; i++) {
            result[i] = (int) Math.round(v2[i] * t + v1[i] * (1 - t));
        }/*www.j a va  2s . co m*/
        return result;
    }
}

Related

  1. interpolate(float out[], float in1[], float in2[], int in2_idx, float coef, int length)
  2. interpolate(int[] data, double x)
  3. interpolate_linear(int[] x, double[] y, int[] xi)
  4. interpolateArray(int[] array, int interval)
  5. interpolateColor(float[] result, float[] color0, float[] color1, double s)
  6. interpolateLinear(int[] vec, int start, int end)
  7. interpolateNonZeroValues(double[] contour)