Vector3D.AngleBetween(Vector3D, Vector3D)Vector3D.AngleBetween(Vector3D, Vector3D)Vector3D.AngleBetween(Vector3D, Vector3D)Vector3D.AngleBetween(Vector3D, Vector3D) Method

정의

첫 번째 지정된 Vector3D 구조체를 두 번째 지정된 Vector3D 구조체에 대해 회전하는 데 필요한 각도를 검색합니다.Retrieves the angle required to rotate the first specified Vector3D structure into the second specified Vector3D structure.

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 Vector3D Vector3D

실행할 첫 번째 Vector3D 구조체입니다.The first Vector3D structure to evaluate.

vector2
Vector3D Vector3D Vector3D Vector3D

실행할 두 번째 Vector3D 구조체입니다.The second Vector3D structure to evaluate.

반환

vector1vector2에 대해 회전하는 데 필요한 각도(도)입니다.The angle in degrees needed to rotate vector1 into vector2.

예제

다음 예제에는 두 개의 사이의 각도 가져오는 방법을 보여 줍니다 Vector3D 구조입니다.The following example shows how to get the angle between two Vector3D structures.

// 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차원3-D 공간에 없으므로 0에서 180도 사이의 각도 반환 됩니다.Signed angles do not extend into 3차원3-D space, so an angle between 0 and 180 degrees is returned.