Diese Dokumentation wurde archiviert und wird nicht länger gepflegt.

Vector.AngleBetween-Methode

Retrieves the angle, expressed in degrees, between the two specified vectors.

Namespace: System.Windows
Assembly: WindowsBase (in windowsbase.dll)

public static double AngleBetween (
	Vector vector1,
	Vector vector2
)
public static double AngleBetween (
	Vector vector1, 
	Vector vector2
)
public static function AngleBetween (
	vector1 : Vector, 
	vector2 : Vector
) : double
Sie können diese Methoden nicht in XAML verwenden.

Parameter

vector1

The first vector to evaluate.

vector2

The second vector to evaluate.

Rückgabewert

The angle, in degrees, between vector1 and vector2.

The following example shows how to use this method to get the angle between two Vector structures.

private Double angleBetweenExample()
{
    Vector vector1 = new Vector(20, 30);
    Vector vector2 = new Vector(45, 70);
    Double angleBetween;

    // angleBetween is approximately equal to 0.9548
    angleBetween = Vector.AngleBetween(vector1, vector2);

    return angleBetween;

}

Microsoft .NET Framework 3.0 wird unter Windows Vista, Microsoft Windows XP SP2 und Windows Server 2003 SP1 unterstützt.

.NET Framework

Unterstützt in: 3.0
Anzeigen: