Point2D.Double, Point2D.Float| Modifier and Type | Field and Description |
|---|---|
double |
x
The x coordinate of the point
|
double |
y
The y coordinate of the point
|
| Constructor and Description |
|---|
Double()
Create a point at (0,0) with double coordinates
|
Double(double x,
double y)
Create a point at (x,y) with double coordinates
|
| Modifier and Type | Method and Description |
|---|---|
double |
getX()
Get the x coordinate as a double
|
double |
getY()
Get the y coordinate as a double
|
void |
setLocation(double x,
double y)
Set the location of this Point2D using double coordinates
|
java.lang.String |
toString()
Represent the Point2D.Double as a String
|
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, setLocationpublic double x
public double y
public Double()
public Double(double x,
double y)
x - the x coordinatey - the y coordinatepublic double getX()
Point2Dpublic double getY()
Point2Dpublic void setLocation(double x,
double y)
Point2DsetLocation in class Point2Dx - the new x coordinatey - the new y coordinatepublic java.lang.String toString()
toString in class java.lang.Object