## jdsl.geomobj.api Interface ThreeArgsGeomTests2D

All Known Subinterfaces:
GeomTester2D
All Known Implementing Classes:
IntRatRatGeomTests2D, IntIntIntGeomTests2D, RatRatRatGeomTests2D, RatIntIntGeomTests2D, IntIntRatGeomTests2D, RatIntRatGeomTests2D

public interface ThreeArgsGeomTests2D

A collection of geometric tests taking three arguments. The parameters of the methods are interfaces.

Version:
\$Id: ThreeArgsGeomTests2D.java,v 1.2 2000/04/03 18:00:51 lv Exp \$
Author:
Luca Vismara (lv)

 Method Summary ` int` ```compareDistances(Point2D q, Point2D p1, Point2D p2)``` ` int` ```leftRightTurn(Point2D p1, Point2D q, Point2D p2)```

 Method Detail

### leftRightTurn

```public int leftRightTurn(Point2D p1,
Point2D q,
Point2D p2)
throws InvalidPointException```
Parameters:
`p1` - a point
`q` - a point
`p2` - a point
Returns:
whether (p1,q,p2) form a GeomTester2D.LEFT_TURN, are GeomTester2D.COLLINEAR, or form a GeomTester2D.RIGHT_TURN
Throws:
`InvalidPointException` - if either p1, or q, or p2 is Point2D.INFINITE

### compareDistances

```public int compareDistances(Point2D q,
Point2D p1,
Point2D p2)
throws InvalidPointException```
Parameters:
`q` - a point
`p1` - a point
`p2` - a point
Returns:
whether the distance between q and p1 is GeomTester2D.LESSER than, GeomTester2D.EQUAL to, or GeomTester2D.GREATER than the distance between q and p2
Throws:
`InvalidPointException` - if q is Point2D.INFINITE