Here you can find the source of cross2D(final float[] v1, final float[] v2)
public static float cross2D(final float[] v1, final float[] v2)
//package com.java2s; /*//from www . j a va2s. c om * #%L * VisBio application for visualization of multidimensional biological * image data. * %% * Copyright (C) 2002 - 2014 Board of Regents of the University of * Wisconsin-Madison. * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 2 of the * License, or (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program. If not, see * <http://www.gnu.org/licenses/gpl-2.0.html>. * #L% */ public class Main { /** Computes the cross product of two 2D vectors. */ public static float cross2D(final float[] v1, final float[] v2) { return v1[0] * v2[1] - v1[1] * v2[0]; } }