Here you can find the source of crossProduct(int ax, int ay, int bx, int by, int cx, int cy)
static private int crossProduct(int ax, int ay, int bx, int by, int cx, int cy)
//package com.java2s; /****************************************************************************** * Copyright (c) 2005, 2010 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors:// w ww . ja v a 2 s .co m * IBM Corporation - initial API and implementation ****************************************************************************/ public class Main { static private int crossProduct(int ax, int ay, int bx, int by, int cx, int cy) { return (ax - cx) * (by - cy) - (ay - cy) * (bx - cx); } }