public static class Point2D.Float extends Point2D implements Serializable
Float
クラスは、float精度で指定された点を定義します。Point2D.Double, Point2D.Float
コンストラクタ | 説明 |
---|---|
Float() |
座標(0, 0)で
Point2D を構築および初期化します。 |
Float(float x, float y) |
指定された座標で
Point2D を構築および初期化します。 |
修飾子と型 | メソッド | 説明 |
---|---|---|
double |
getX() |
この
Point2D のX座標をdouble 精度で返します。 |
double |
getY() |
この
Point2D のY座標をdouble 精度で返します。 |
void |
setLocation(double x, double y) |
この
Point2D の位置を、指定されたdouble 型の座標に設定します。 |
void |
setLocation(float x, float y) |
この
Point2D の位置を、指定されたfloat 型の座標に設定します。 |
String |
toString() |
この
Point2D の値を表すString を返します。 |
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, hashCode, setLocation
public float x
Point2D
のX座標。public float y
Point2D
のY座標。public Float()
Point2D
を構築および初期化します。public Float(float x, float y)
Point2D
を構築および初期化します。x
- 新しく構築されるPoint2D
のX座標y
- 新しく構築されるPoint2D
のY座標public double getX()
Point2D
のX座標をdouble
精度で返します。public double getY()
Point2D
のY座標をdouble
精度で返します。public void setLocation(double x, double y)
Point2D
の位置を、指定されたdouble
型の座標に設定します。setLocation
、クラスPoint2D
x
- Point2D
の新しいX座標y
- このPoint2D
の新しいY座標public void setLocation(float x, float y)
Point2D
の位置を、指定されたfloat
型の座標に設定します。x
- Point2D
の新しいX座標y
- このPoint2D
の新しいY座標 バグまたは機能を送信
詳細なAPIリファレンスおよび開発者ドキュメントについては、Java SEのドキュメントを参照してください。 そのドキュメントには、概念的な概要、用語の定義、回避方法、有効なコード例などの、開発者を対象にしたより詳細な説明が含まれています。
Copyright © 1993, 2025, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Documentation Redistribution Policyも参照してください。