Java Array Subtract subtract2(double[] v1, double[] v2, double[] res)

Here you can find the source of subtract2(double[] v1, double[] v2, double[] res)

Description

subtracts two vectors v1-v2, writes into res

License

Open Source License

Declaration

public static void subtract2(double[] v1, double[] v2, double[] res) 

Method Source Code

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

public class Main {
    /** subtracts two vectors v1-v2, writes into res*/
    public static void subtract2(double[] v1, double[] v2, double[] res) {
        res[0] = v1[0] - v2[0];// www .  j a  v  a2s . c  o  m
        res[1] = v1[1] - v2[1];
        res[2] = v1[2] - v2[2];
    }
}

Related

  1. subtract(float a[][][], float b[][][])
  2. subtract(float[] dividend, float[] divisor)
  3. subtract(int a, int[] b)
  4. subtract(int bytesPerDim, int dim, byte[] a, byte[] b, byte[] result)
  5. subtract(int[] a, int[] b)
  6. subtractArray(double[] array1, double[] array2)
  7. subtractArray(float[] arr1, float[] arr2)
  8. subtractElementwise(int[] a, int[] b)
  9. subtractImages(float[][] top, float[][] base)