private static double [ ] crossProduct ( double [ ] u , double [ ] v ) { return new double [ ] { ( u [ 1 ] * v [ 2 ] ) - ( v [ 1 ] * u [ 2 ] ) , ( u [ 2 ] * v [ 0 ] ) - ( v [ 2 ] * u [ 0 ] ) , ( u [ 0 ] * v [ 1 ] ) - ( v [ 0 ] * u [ 1 ] ) } ; }
Cross product of two 3D coordinates