Matrix.Equality(Matrix, Matrix)Matrix.Equality(Matrix, Matrix)Matrix.Equality(Matrix, Matrix)Matrix.Equality(Matrix, Matrix) Operator

定義

public:
static bool operator ==(System::Windows::Media::Matrix matrix1, System::Windows::Media::Matrix matrix2);
public static bool operator == (System.Windows.Media.Matrix matrix1, System.Windows.Media.Matrix matrix2);
static member ( = ) : System.Windows.Media.Matrix * System.Windows.Media.Matrix -> bool
Public Shared Operator == (matrix1 As Matrix, matrix2 As Matrix) As Boolean

參數

matrix1
Matrix Matrix Matrix Matrix

matrix2
Matrix Matrix Matrix Matrix

範例

private void equalityExample()
{

Matrix matrix1 = new Matrix(5, 10, 15, 20, 25, 30);
Matrix matrix2 = new Matrix(5, 10, 15, 20, 25, 30);

Boolean result;

// result is true.
result = (matrix1 == matrix2);

// result is false.
result = (matrix1 != matrix2);

}

備註

Matrix將其值儲存為雙精確度浮點數。A Matrix stores its values as doubles. 在對其執行算術Double運算時, 的值可能會失去精確度, 因此邏輯上相等的Double兩個結構之間的比較可能會失敗。Because the value of a Double can lose precision when arithmetic operations are performed on it, a comparison between two Double structures that are logically equal might fail.