|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--physicon.graphLib.DoublePoint
The help class for the library. Represents the point with double coordinates x, y
Field Summary | |
double |
x
|
double |
y
|
Constructor Summary | |
DoublePoint()
Constructor. |
|
DoublePoint(double _x,
double _y)
Constructor. |
|
DoublePoint(DoublePoint _dpt)
Constructor |
Method Summary | |
boolean |
equals(DoublePoint _dpt)
Compares two DoublePoints. |
double |
length()
Returns the distance from the current point to the reference point (0, 0). |
void |
move(double _x,
double _y)
Moves the current object to another location. |
void |
move(DoublePoint _dpt)
Moves the current object to the new location |
java.lang.String |
toString()
Returns string representation of this double point. |
void |
translate(double _dx,
double _dy)
Translates the current object to the given vector |
void |
translate(DoublePoint _dpt)
Translates the current object to the given vector |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public double x
public double y
Constructor Detail |
public DoublePoint()
public DoublePoint(double _x, double _y)
_x
- - the x coordinate of the point_y
- - the y coordinate of the pointpublic DoublePoint(DoublePoint _dpt)
_dpt
- - the point to copy coordinates fromMethod Detail |
public boolean equals(DoublePoint _dpt)
_dpt
- - the DoublePoint which is to
be compared with the current objectpublic void move(double _x, double _y)
_x
- - new x coordinate of the current object_y
- - new y coordinate of the current objectpublic void move(DoublePoint _dpt)
_dpt
- - the DoublePoint with new
coordinates of the current objectpublic void translate(double _dx, double _dy)
_dx
- - shift in the x coordinate of
the current object_dy
- - shift in the y coordinate of
the current objectpublic void translate(DoublePoint _dpt)
_dpt
- - the vector of translation.
its coordinates will be added to the
coordinates of current objectpublic double length()
public java.lang.String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |