Here you can find the source of arrayMinus(double[] w, double[] v)
public static double[] arrayMinus(double[] w, double[] v)
//package com.java2s; //License from project: Open Source License public class Main { public static double[] arrayMinus(double[] w, double[] v) { double result[] = w.clone(); for (int i = 0; i < w.length; i++) { result[i] -= v[i];//from ww w .ja v a2s. com } return result; } public static double[] arrayMinus(double[] result, double[] w, double[] v) { for (int i = 0; i < w.length; i++) { result[i] = w[i] - v[i]; } return result; } }