jdsl.geomobj.ref
Class RatIntRatGeomTests2D

java.lang.Object
  |
  +--jdsl.geomobj.ref.RatIntRatGeomTests2D
All Implemented Interfaces:
ThreeArgsGeomTests2D

public class RatIntRatGeomTests2D
extends java.lang.Object
implements ThreeArgsGeomTests2D

Implementation of interface ThreeArgsGeomTests2D with integer second argument, and rational first and third arguments.

Version:
$Id: RatIntRatGeomTests2D.java,v 1.2 2000/04/03 18:15:48 lv Exp $
Author:
Luca Vismara (lv)

Constructor Summary
RatIntRatGeomTests2D()
           
 
Method Summary
 int compareDistances(Point2D q, Point2D p1, Point2D p2)
           
 int leftRightTurn(Point2D p1, Point2D q, Point2D p2)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RatIntRatGeomTests2D

public RatIntRatGeomTests2D()
Method Detail

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 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)
Specified by:
compareDistances in interface ThreeArgsGeomTests2D
Following copied from interface: jdsl.geomobj.api.ThreeArgsGeomTests2D
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