Java Array Cross Product cross33(float u[], float v[])

Here you can find the source of cross33(float u[], float v[])

Description

cross

License

Open Source License

Declaration

public static float[] cross33(float u[], float v[]) 

Method Source Code

//package com.java2s;
/*// w ww. j a  va  2 s .c o  m
 * @(#)gl_util.java 0.3 06/11/20
 *
 * jGL 3-D graphics library for Java
 * Copyright (c) 1999-2006 Robin Bing-Yu Chen (robin@ntu.edu.tw)
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or any later version. the GNU Lesser
 * General Public License should be included with this distribution
 * in the file LICENSE.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 */

public class Main {
    public static float[] cross33(float u[], float v[]) {
        float m[] = new float[3];
        m[0] = u[1] * v[2] - u[2] * v[1];
        m[1] = u[2] * v[0] - u[0] * v[2];
        m[2] = u[0] * v[1] - u[1] * v[0];
        return m;
    }
}

Related

  1. cross(float[] vec1, float[] vec2)
  2. cross(int x1, int y1, int x2, int y2)
  3. cross2D(final float[] v1, final float[] v2)
  4. cross2D(int[] v, int[] u)
  5. cross3(double x1, double y1, double z1, double x2, double y2, double z2)
  6. crossEndForLineVectorAlgebra(double x1, double y1, double x2, double y2, double margin, double width)
  7. crossMuliply(double a, double b, double c)
  8. crossMult(int value, int maximum, int coefficient)
  9. crossProduct(double x1, double y1, double x2, double y2, double x3, double y3)