Here you can find the source of subtract2(double[] v1, double[] v2, double[] res)
public static void subtract2(double[] v1, double[] v2, double[] res)
//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]; } }