Java Array Cross Product CrossProduct(final double[] vect1, final double[] vect2)

Here you can find the source of CrossProduct(final double[] vect1, final double[] vect2)

Description

Cross Product

License

Open Source License

Declaration

public static double[] CrossProduct(final double[] vect1, final double[] vect2) 

Method Source Code

//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
}

Related

  1. crossEndForLineVectorAlgebra(double x1, double y1, double x2, double y2, double margin, double width)
  2. crossMuliply(double a, double b, double c)
  3. crossMult(int value, int maximum, int coefficient)
  4. crossProduct(double x1, double y1, double x2, double y2, double x3, double y3)
  5. crossProduct(double[] output, double[] a, double[] b)
  6. crossProduct(int ax, int ay, int bx, int by, int cx, int cy)
  7. crossProduct(Object[] firstArray, Object[]... otherArrays)