Point Cross Product - Java java.lang

Java examples for java.lang:Math Geometry

Description

Point Cross Product

Demo Code


import static java.lang.Math.sqrt;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Random;

public class Main{
    public static float CrossProduct(Point v1, Point v2) {
        return (v1.x * v2.y) - (v1.y * v2.x);
    }//from   w  w w.ja v a  2 s.com
}

Related Tutorials