Here you can find the source of crossProduct(double[] output, double[] a, double[] b)
public static double[] crossProduct(double[] output, double[] a, double[] b)
//package com.java2s; //License from project: Open Source License public class Main { public static double[] crossProduct(double[] output, double[] a, double[] b) { output[0] = a[1] * b[2] - a[2] * b[1]; output[1] = a[2] * b[0] - a[0] * b[2]; output[2] = a[0] * b[1] - a[1] * b[0]; return output; }/*from w w w . jav a 2s. c o m*/ }