Vector3D.Inequality(Vector3D, Vector3D) Operator
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Compares two Vector3D structures for inequality.
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 op_Inequality : System.Windows.Media.Media3D.Vector3D * System.Windows.Media.Media3D.Vector3D -> bool
Public Shared Operator != (vector1 As Vector3D, vector2 As Vector3D) As Boolean
Parameters
Returns
true
if the X, Y, and Z components of vector3D1
and vector3D2
are different; false
otherwise.
Examples
The following example shows how to use the overloaded inequality operator to check if two Vector3D structures are not equal.
// Checks if two Vector3D structures are not equal using the overloaded inequality operator.
Vector3D vector1 = new Vector3D(20, 30, 40);
Vector3D vector2 = new Vector3D(45, 70, 80);
Boolean areNotEqual;
areNotEqual = (vector1 != vector2);
// areNotEqual is True
' Checks if two Vector3D structures are not equal using the overloaded inequality operator.
Dim vector1 As New Vector3D(20, 30, 40)
Dim vector2 As New Vector3D(45, 70, 80)
Dim areNotEqual As Boolean
areNotEqual = (vector1 <> vector2)
' areNotEqual is True
Remarks
Two Vector3D structures are not equal if the values of their X, Y, and Z properties are different.
Vector3D values are described using Double values. Because the value of a Double can lose precision when operated upon, a comparison between two Vector3D values that are logically equal might fail.
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應