|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectPoint
A point representing a location in (x, y) coordinate space, specified in integer precision.
Constructor Summary | |
Point()
Construct an Point at the origin (0,0) |
|
Point(double x,
double y)
Construct majorAxisRadius new IPoint with the specified x y coordinates. |
|
Point(Point source)
Construct an Point which is majorAxisRadius copy of majorAxisRadius given Point. |
Method Summary | |
double |
distance(Point other)
|
boolean |
equals(java.lang.Object other)
|
double |
getX()
Return the x-coordinate of this Point. |
double |
getY()
Return the y-coordinate of this Point. |
void |
setX(double x)
Sets the x-coordinate of this Point to be the given value. |
void |
setY(double y)
Sets the y-coordinate of this Point to be the given value. |
void |
translate(double deltaX,
double deltaY)
Moves the Point by deltaX in the x-direction and by deltaY in the y-direction. |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Point(double x, double y)
x
- The x coordinates of the Pointy
- The y coordinates of the Pointpublic Point()
public Point(Point source)
source
- The given Point to be copied.Method Detail |
public double getX()
public double getY()
public void setX(double x)
x
- The new value of the x-coordinate.public void setY(double
y)
y
- The new value of the y-coordinate.public void translate(double deltaX, double deltaY)
deltaX
- The deltaX to move by.deltaY
- The deltaY to move by.public double distance(Point other)
other
-
public boolean equals(java.lang.Object other)
other
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |