Vector3D.Equality(Vector3D, Vector3D) Vector3D.Equality(Vector3D, Vector3D) Vector3D.Equality(Vector3D, Vector3D) Vector3D.Equality(Vector3D, Vector3D) Operator

Definition

Vergleicht zwei Vector3D -Strukturen auf Gleichheit.Compares two Vector3D structures for equality.

public:
 static bool operator ==(System::Windows::Media::Media3D::Vector3D vector1, System::Windows::Media::Media3D::Vector3D vector2);
public static bool operator == (System.Windows.Media.Media3D.Vector3D vector1, System.Windows.Media.Media3D.Vector3D vector2);
static member ( = ) : System.Windows.Media.Media3D.Vector3D * System.Windows.Media.Media3D.Vector3D -> bool
Public Shared Operator == (vector1 As Vector3D, vector2 As Vector3D) As Boolean

Parameter

vector1
Vector3D Vector3D Vector3D Vector3D

Die erste zu vergleichende Vector3D-Struktur.The first Vector3D structure to compare.

vector2
Vector3D Vector3D Vector3D Vector3D

Die zweite zu vergleichende Vector3D-Struktur.The second Vector3D structure to compare.

Gibt zurück

true Wenn die X, Y, und Z Komponenten vector1 und vector2 gleich sind false andernfalls.true if the X, Y, and Z components of vector1 and vector2 are equal; false otherwise.

Beispiele

Das folgende Beispiel zeigt, wie mithilfe des überladenen Gleichheitsoperators zwei Vector3D -Strukturen gleich sind.The following example shows how to use the overloaded equality operator to check if two Vector3D structures are equal.

// Checks if two Vector3D structures are equal using the overloaded equality operator.

Vector3D vector1 = new Vector3D(20, 30, 40);
Vector3D vector2 = new Vector3D(45, 70, 80);
Boolean areEqual;

areEqual = (vector1 == vector2);
// areEqual is False
' Checks if two Vector3D structures are equal using the overloaded equality operator.

Dim vector1 As New Vector3D(20, 30, 40)
Dim vector2 As New Vector3D(45, 70, 80)
Dim areEqual As Boolean

areEqual = (vector1 = vector2)
' areEqual is False

Hinweise

Zwei Vector3D -Strukturen sind gleich, wenn die Werte ihrer X, Y, und Z Eigenschaften entsprechen.Two Vector3D structures are equal if the values of their X, Y, and Z properties are the same.

Vector3D Werte werden mithilfe von beschrieben Double Werte.Vector3D values are described using Double values. Da der Wert des einem Double abnehmen kann, wenn Sie bearbeitet, eines Vergleichs zwischen zwei Vector3D Werte, die logisch gleich sind möglicherweise nicht.Because the value of a Double can lose precision when operated upon, a comparison between two Vector3D values that are logically equal might fail.

Gilt für:

Siehe auch