public static class Point2D.Float extends Point2D implements Serializable
Float类定义了浮点精度指定的点。
Point2D.Double, Point2D.Float| Modifier and Type | Field and Description |
|---|---|
float |
x
这个
Point2D的X
Point2D 。
|
float |
y
这个
Point2D的Y
Point2D 。
|
| Constructor and Description |
|---|
Float()
构造并初始化一个
Point2D具有坐标(0,0)。
|
Float(float x, float y)
构造并初始化一个
Point2D以指定的坐标。
|
| Modifier and Type | Method and Description |
|---|---|
double |
getX()
返回这个
Point2D的
double坐标在
double精度。
|
double |
getY()
返回这个
Point2D的
double坐标在
double精度。
|
void |
setLocation(double x, double y)
将此
Point2D的位置设置为指定的
double坐标。
|
void |
setLocation(float x, float y)
将此
Point2D的位置设置为指定的
float坐标。
|
String |
toString()
返回
String表示此值
Point2D 。
|
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, hashCode, setLocationpublic float x
Point2D的X
Point2D 。
public float y
Point2D的Y
Point2D 。
public Float()
Point2D具有坐标(0,0)。
public Float(float x,
float y)
Point2D以指定的坐标。
x - 新建的Point2D的X
Point2D
y - 新建的Point2D的Y
Point2D
public double getX()
Point2D在
double精度。
public double getY()
Point2D的
double坐标在
double精度。
public void setLocation(double x,
double y)
Point2D的位置设置为指定的
double坐标。
setLocation在类别
Point2D
x - 这个
Point2D的新X
Point2D
y - 这个
Point2D的新的Y
Point2D
public void setLocation(float x,
float y)
Point2D的位置设置为指定的
float坐标。
x - 这个
Point2D的新X
Point2D
y - 这个
Point2D的新的Y
Point2D
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.