jdsl.geomobj.ref
Class IntIntRatGeomTests2D
java.lang.Object
|
+--jdsl.geomobj.ref.IntIntRatGeomTests2D
- All Implemented Interfaces:
- ThreeArgsGeomTests2D
- public class IntIntRatGeomTests2D
- extends java.lang.Object
- implements ThreeArgsGeomTests2D
Implementation of interface ThreeArgsGeomTests2D with integer first
and second arguments, and rational third argument.
- Version:
- $Id: IntIntRatGeomTests2D.java,v 1.2 2000/04/03 18:15:46 lv Exp $
- Author:
- Luca Vismara (lv)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IntIntRatGeomTests2D
public IntIntRatGeomTests2D()
leftRightTurn
public int leftRightTurn(Point2D p1,
Point2D q,
Point2D p2)
- Specified by:
leftRightTurn
in interface ThreeArgsGeomTests2D
- Following copied from interface:
jdsl.geomobj.api.ThreeArgsGeomTests2D
- Parameters:
p1
- a pointq
- a pointp2
- 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)
- Specified by:
compareDistances
in interface ThreeArgsGeomTests2D
- Following copied from interface:
jdsl.geomobj.api.ThreeArgsGeomTests2D
- Parameters:
q
- a pointp1
- a pointp2
- 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