| Constructor and Description |
|---|
Point()
Instantiates a new
Point instance with 0 x and y. |
Point(double x,
double y)
Instantiates a new
Point instance based on passed x and y. |
Point(Point other)
|
| Modifier and Type | Method and Description |
|---|---|
Object |
clone() |
double |
distance(double px,
double py)
The distance between this point and the second point which is defined by passed x and y coordinates.
|
double |
distance(Point p)
The distance between this point and the second point.
|
boolean |
equals(Object obj) |
Point |
getLocation()
Gets location of point by creating a new copy.
|
double |
getX()
Gets x coordinate of the point.
|
double |
getY()
Gets y coordinate of the point.
|
int |
hashCode() |
void |
move(double dx,
double dy)
Moves the point by the specified offset.
|
void |
setLocation(double x,
double y)
Sets x and y double coordinates of the point.
|
String |
toString() |
public Point()
Point instance with 0 x and y.public Point(double x,
double y)
Point instance based on passed x and y.x - the x coordinates of the pointy - the y coordinates of the pointpublic double getX()
public double getY()
public Point getLocation()
public void setLocation(double x,
double y)
x - the x coordinatey - the y coordinatepublic void move(double dx,
double dy)
dx - the x-axis offsetdy - the y-axis offsetpublic double distance(double px,
double py)
px - the x coordinate of the second pointpy - the y coordinate of the second pointpublic double distance(Point p)
p - the second point to calculate distanceCopyright © 1998–2025 Apryse Group NV. All rights reserved.