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, setLocation
public double x
public double y
public Double()
public Double(double x, double y)
x
- the x coordinatey
- the y coordinatepublic double getX()
Point2D
public double getY()
Point2D
public void setLocation(double x, double y)
Point2D
setLocation
in class Point2D
x
- the new x coordinatey
- the new y coordinatepublic java.lang.String toString()
toString
in class java.lang.Object