Matrix.Equality(Matrix, Matrix) Operator

Definition

Determina si las dos estructuras Matrix especificadas son idénticas.Determines whether the two specified Matrix structures are identical.

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

Parameters

matrix1
Matrix

Primera estructura Matrix que se va a comparar.The first Matrix structure to compare.

matrix2
Matrix

Segunda estructura Matrix que se va a comparar.The second Matrix structure to compare.

Returns

Boolean

Es true si matrix1 y matrix2 son idénticos; de lo contrario, es false.true if matrix1 and matrix2 are identical; otherwise, false.

Examples

En el ejemplo siguiente se muestra cómo comprobar la igualdad de dos estructuras Matrix.The following example shows how to check two Matrix structures for equality.

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);
}

Remarks

Note

Un Matrix almacena sus valores como dobles.A Matrix stores its values as doubles. Dado que el valor de un Double puede perder precisión cuando se realizan operaciones aritméticas en él, es posible que se produzca un error en una comparación entre dos estructuras Double que son lógicamente iguales.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.

Applies to

See also