Java String Sub String substraction2(double[] a, double[] b)

Here you can find the source of substraction2(double[] a, double[] b)

Description

get the difference of two 2-dimension vector

License

Apache License

Parameter

Parameter Description
Vector B double[x,y]

Return

the vector which represent the difference A-B

Declaration

public static double[] substraction2(double[] a, double[] b) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    /**//w w  w . j  av  a2  s .c  om
     * get the difference of two 2-dimension vector
     * @param Vector A double[x,y]
     * @param Vector B double[x,y]
     * @return the vector which represent the difference A-B
     */
    public static double[] substraction2(double[] a, double[] b) {
        return new double[] { a[0] - b[0], a[1] - b[1] };
    }
}

Related

  1. substr(StringBuffer buf)
  2. substract(double[] a, double[] b)
  3. substract(double[] a, double[] b)
  4. substract(int[] array1, int[] array2)
  5. substract(Number n1, Number n2)
  6. substractPrefixPostfix(Object obj, String prefix, String suffix)
  7. subStrBeforeDotNotIncludeDot(String str)
  8. subStrByBytes(String str, int len, String tail)
  9. substrByLength(String str, int start, int size, String markCode)