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

정의

Vector3D 구조체가 같은지 여부를 비교합니다.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

매개 변수

vector1
Vector3D Vector3D Vector3D Vector3D

비교할 첫 번째 Vector3D 구조체입니다.The first Vector3D structure to compare.

vector2
Vector3D Vector3D Vector3D Vector3D

비교할 두 번째 Vector3D 구조체입니다.The second Vector3D structure to compare.

반환

vector1vector2X, YZ 구성 요소가 같으면 true이고, 그렇지 않으면 false입니다.true if the X, Y, and Z components of vector1 and vector2 are equal; false otherwise.

예제

다음 예제에서는 오버 로드 된 같음 연산자를 사용 하 여 두 가지 경우를 확인 하는 방법을 보여 줍니다 Vector3D 구조체가 동일 합니다.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

설명

해당 Vector3D, XY 속성의 값이 같으면 두 Z 구조체가 같습니다.Two Vector3D structures are equal if the values of their X, Y, and Z properties are the same.

Vector3D 값을 사용 하 여 설명 Double 값입니다.Vector3D values are described using Double values. 때문에 값을 Double 간 비교에 연산을 수행 하는 경우 정밀도 떨어질 수 Vector3D 논리적으로 동일한 값을 실패할 수 있습니다.Because the value of a Double can lose precision when operated upon, a comparison between two Vector3D values that are logically equal might fail.

적용 대상

추가 정보