Here you can find the source of CrossProduct(final double[] vect1, final double[] vect2)
public static double[] CrossProduct(final double[] vect1, final double[] vect2)
//package com.java2s; //License from project: Open Source License public class Main { public static double[] CrossProduct(final double[] vect1, final double[] vect2) { final double[] result = new double[3]; result[0] = vect1[1] * vect2[2] - vect1[2] * vect2[1]; result[1] = vect1[2] * vect2[0] - vect1[0] * vect2[2]; result[2] = vect1[0] * vect2[1] - vect1[1] * vect2[0]; return result; }// w w w. ja v a2 s.c o m }