|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--hypercast.DT.DT_DoublePoint
This class represents a point in two dimensions, where the coordinates of the point are doubles. It is used for increased accuracy over DT_Point. It is immutable.
Field Summary | |
static double |
EPSILON
The error used in the function equals() |
Constructor Summary | |
DT_DoublePoint(double xx,
double yy)
|
|
DT_DoublePoint(hypercast.DT.DT_DoublePoint p)
|
|
DT_DoublePoint(hypercast.DT.DT_Point p)
|
Method Summary | |
static double |
distance(hypercast.DT.DT_DoublePoint a,
hypercast.DT.DT_DoublePoint b)
Returns the Euclidean distance between two points. |
boolean |
equals(java.lang.Object o)
Compares this to either a DT_DoublePoint or a DT_Point. |
static hypercast.DT.DT_DoublePoint |
findInterceptOfLines(double f,
double s,
double g,
double t)
Returns the point at the interception of two lines. |
double |
getX()
|
double |
getY()
|
int |
hashCode()
Override to Object.hashCode() so that this object can be used as a key in a hashtable. |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static double EPSILON
equals()
Constructor Detail |
public DT_DoublePoint(hypercast.DT.DT_DoublePoint p)
public DT_DoublePoint(hypercast.DT.DT_Point p)
public DT_DoublePoint(double xx, double yy)
Method Detail |
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
EPSILON
EPSILON
public int hashCode()
hashCode
in class java.lang.Object
public double getX()
public double getY()
public static double distance(hypercast.DT.DT_DoublePoint a, hypercast.DT.DT_DoublePoint b)
public static hypercast.DT.DT_DoublePoint findInterceptOfLines(double f, double s, double g, double t)
x = (g-f)/(s-t);
y = f + s*x;
java.lang.ArithmeticException
- if s == t
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |