Vector3D.AngleBetween(Vector3D, Vector3D) メソッド

定義

最初に指定した Vector3D 構造体を回転して 2 番目に指定した Vector3D 構造体と一致させるために必要な角度を取得します。

public:
 static double AngleBetween(System::Windows::Media::Media3D::Vector3D vector1, System::Windows::Media::Media3D::Vector3D vector2);
public static double AngleBetween (System.Windows.Media.Media3D.Vector3D vector1, System.Windows.Media.Media3D.Vector3D vector2);
static member AngleBetween : System.Windows.Media.Media3D.Vector3D * System.Windows.Media.Media3D.Vector3D -> double
Public Shared Function AngleBetween (vector1 As Vector3D, vector2 As Vector3D) As Double

パラメーター

vector1
Vector3D

最初に評価する Vector3D 構造体。

vector2
Vector3D

2 番目に評価する Vector3D 構造体。

戻り値

Double

vector1 を回転して vector2 にするために必要な角度。

次の例は、2 つの Vector3D 構造体間の角度を取得する方法を示しています。

                    // Calculates the angle between two Vector3Ds using the static AngleBetween method. 
                    // Returns a Double.

                    Vector3D vector1 = new Vector3D(20, 30, 40);
                    Vector3D vector2 = new Vector3D(45, 70, 80);
                    Double angleBetween;

                    angleBetween = Vector3D.AngleBetween(vector1, vector2 );
                    // angleBetween is approximately equal to 4.15129
' Calculates the angle between two Vector3Ds using the static AngleBetween method. 
' Returns a Double.

Dim vector1 As New Vector3D(20, 30, 40)
Dim vector2 As New Vector3D(45, 70, 80)
Dim angleBetween As Double

angleBetween = Vector3D.AngleBetween(vector1, vector2)
' angleBetween is approximately equal to 4.15129

注釈

符号付き角度は 3-D 空間に拡張されないため、0 ~ 180 度の角度が返されます。

適用対象