Example
Vector2 は、倍精度の2成分ベクトルで、 x および y 成分です。主にUVテクスチャ座標および2D計算に使用されます。.
Example: com.aspose.threed
Example
| Example | Example |
|---|
Vector2() | ゼロベクトルを作成します (0, 0) |
Vector2(double x, double y) | 2つの成分から作成します |
Vector2(Vector2 other) | コピーコンストラクタ |
公開フィールド
Vector2 使用します 公開フィールド コンポーネントへのアクセス用(getter/setter メソッドではなく):
| Example | Example | Example | Example |
|---|
x | double | v.x | X 成分 |
y | double | v.y | Y 成分 |
計算プロパティ
| Example | Example | Example | Example |
|---|
length | double | getLength() | ユークリッド長、読み取り専用 |
length2 | double | getLength2() | 二乗長、読み取り専用 |
Example
| Example | 戻り値の型 | Example |
|---|
dot(Vector2 rhs) | double | 他のベクトルとのドット積 Vector2 |
normalize() | Vector2 | 単位長さのコピーを返す |
set(double x, double y) | void | 両方のコンポーネントをその場で設定 |
compareTo(Vector2 other) | int | 辞書式比較: -1、0、または1を返す |
Example
参照