Compartir vía


Vector3D.AngleBetween(Vector3D, Vector3D) Método

Definición

Recupera el ángulo necesario para girar la primera estructura especificada Vector3D en la segunda estructura especificada 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

Parámetros

vector1
Vector3D

Primera estructura Vector3D que se va a evaluar.

vector2
Vector3D

Segunda estructura Vector3D que se va a evaluar.

Devoluciones

Ángulo, expresado en grados, que es necesario para girar vector1 en vector2.

Ejemplos

En el ejemplo siguiente se muestra cómo obtener el ángulo entre dos Vector3D estructuras.

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

Comentarios

Los ángulos con signo no se extienden al espacio 3D, por lo que se devuelve un ángulo entre 0 y 180 grados.

Se aplica a