Point4D.Inequality(Point4D, Point4D) Operator

定義

2 つの Point4D 構造体の不等値を比較します。

public:
 static bool operator !=(System::Windows::Media::Media3D::Point4D point1, System::Windows::Media::Media3D::Point4D point2);
public static bool operator !=(System.Windows.Media.Media3D.Point4D point1, System.Windows.Media.Media3D.Point4D point2);
static member op_Inequality : System.Windows.Media.Media3D.Point4D * System.Windows.Media.Media3D.Point4D -> bool
Public Shared Operator != (point1 As Point4D, point2 As Point4D) As Boolean

パラメーター

point1
Point4D

比較する最初の Point4D 構造体。

point2
Point4D

比較する 2 番目の Point4D 構造体。

返品

true XYZWpoint4D1、およびpoint4D2座標が異なる場合はfalse

次の例は、オーバーロードされた不等値演算子を使用して、2 つの Point4D 構造体が等しくないかどうかを確認する方法を示しています。

// Checks if two Point4Ds are not equal using the overloaded inequality operator.

Point4D point1 = new Point4D(10, 5, 1, 4);
Point4D point2 = new Point4D(15, 40, 60, 75);
Boolean areNotEqual;

areNotEqual = (point1 != point2);
// areNotEqual is True

// Displaying Results
syntaxString = "areNotEqual = (point1 != point2);";
resultType = "Boolean";
operationString = "Checking if two 3D points are not equal";
ShowResults(areNotEqual.ToString(), syntaxString, resultType, operationString);
' Checks if two Point4Ds are not equal using the overloaded inequality operator.

Dim point1 As New Point4D(10, 5, 1, 4)
Dim point2 As New Point4D(15, 40, 60, 75)
Dim areNotEqual As Boolean

areNotEqual = (point1 <> point2)
' areNotEqual is True

' Displaying Results
syntaxString = "areNotEqual = (point1 != point2)"
resultType = "Boolean"
operationString = "Checking if two 3D points are not equal"
ShowResults(areNotEqual.ToString(), syntaxString, resultType, operationString)

注釈

Point4DXY、およびZプロパティの値が異なる場合、2 つのW構造体は等しくありません。

Double値に対して算術演算を実行すると精度が失われる可能性があるため、論理的に等しい 2 つのPoint4D値の比較が失敗する可能性があります。

適用対象