public static class Point2D.Float extends Point2D implements Serializable
Float类定义一个点精度指定。
Point2D.Double, Point2D.Float| Modifier and Type | Field and Description |
|---|---|
float |
x
这
Point2D X坐标。
|
float |
y
这
Point2D Y坐标。
|
| Constructor and Description |
|---|
Float()
构造和初始化一个
Point2D坐标(0, 0)。
|
Float(float x, float y)
构建与指定的坐标初始化一个
Point2D。
|
| Modifier and Type | Method and Description |
|---|---|
double |
getX()
返回x坐标本
Point2D在
double精度。
|
double |
getY()
返回
double精度这
Point2D Y坐标。
|
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坐标。
public float y
Point2D Y坐标。
public Float()
Point2D坐标(0, 0)。
public Float(float x,
float y)
Point2D。
x -新建
Point2D X坐标
y -新建
Point2D Y坐标
public double getX()
Point2D在
double精度。
public double getY()
double精度这
Point2D Y坐标。
public void setLocation(double x,
double y)
Point2D定位到指定的
double坐标。
setLocation 方法重写,继承类
Point2D
x -新的X坐标本
Point2D
y -这
Point2D新的Y坐标
public void setLocation(float x,
float y)
Point2D定位到指定的
float坐标。
x -新的X坐标本
Point2D
y -这
Point2D新的Y坐标
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.