Point2D.Double, Point2D.Float| Modifier and Type | Field and Description |
|---|---|
float |
x
The x coordinate of the point
|
float |
y
The y coordinate of the point
|
| Constructor and Description |
|---|
Float()
Create a point at (0,0) with float coordinates
|
Float(float x,
float y)
Create a point at (x,y) with float 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
|
void |
setLocation(float x,
float y)
Set the location of the point
|
java.lang.String |
toString()
Represent the Point2SD.Float as a String
|
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, setLocationpublic float x
public float y
public Float()
public Float(float x,
float 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 void setLocation(float x,
float y)
x - the new x coordinatey - the new y coordinatepublic java.lang.String toString()
toString in class java.lang.Object