/** Simple wrapper class around a 2D cartesian point. It provides the 
 * helper method to determine if three points constitute a left hand turn.
 */
public class Point2D
{
	public double x;
	public double y;
	
	public Point2D( double x, double y )
	{
		this.x = x;
		this.y = y;
	}
	
	public Point2D( )
	{
		x = y = 0.0;
	}
	
	/** Does the point b lie to the left of an infinite line 
		from point a to point c ? */
	public static boolean isLeft( Point2D a, Point2D b, Point2D c )
	{
		double det = a.x*(b.y-c.y) - a.y*(b.x-c.x) + (b.x*c.y-c.x*b.y);
		return det < 0;
	}
}

