Java Array Cross Product cross(double[] vec1, double[] vec2, double[] outvec)

Here you can find the source of cross(double[] vec1, double[] vec2, double[] outvec)

Description

cross

License

Apache License

Declaration

public static void cross(double[] vec1, double[] vec2, double[] outvec) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static void cross(double[] vec1, double[] vec2, double[] outvec) {
        outvec[0] = vec1[1] * vec2[2] - vec1[2] * vec2[1];
        outvec[1] = vec1[2] * vec2[0] - vec1[0] * vec2[2];
        outvec[2] = vec1[0] * vec2[1] - vec1[1] * vec2[0];
    }//from w  w w .  ja  v  a 2  s . com
}

Related

  1. cross(double v0x, double v0y, double v1x, double v1y)
  2. cross(double v1[], double v2[])
  3. cross(double[] p, double[] q)
  4. cross(final double[] a, final double[] b, final double[] c)
  5. cross(final double[] left, final double[] right)
  6. cross(float[] v1, float[] v2, float[] out)
  7. cross(float[] vec1, float[] vec2)