Here you can find the source of substraction2(double[] a, double[] b)
Parameter | Description |
---|---|
Vector | B double[x,y] |
public static double[] substraction2(double[] a, double[] b)
//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] }; } }