Matrix.M22 プロパティ

定義

この Matrix 構造体の第 2 行、第 2 列の値を取得または設定します。

public:
 property double M22 { double get(); void set(double value); };
public double M22 { get; set; }
member this.M22 : double with get, set
Public Property M22 As Double

プロパティ値

この Matrix 構造体の第 2 行、第 2 列の値。 既定値は 1 です。

次の例は、2 つの Matrix 構造体を乗算する方法と、構造体が宣言されたときに、 構造体が宣言された後に 値を に Matrix 割り当てる方法を示しています。

private void multiplicationExample()
{

    Matrix matrix1 = new Matrix(5, 10, 15, 20, 25, 30);
    Matrix matrix2 = new Matrix(2, 4, 6, 8, 10, 12);
    
    // matrixResult is equal to (70,100,150,220,240,352) 
    Matrix matrixResult = Matrix.Multiply(matrix1, matrix2);
    
    // matrixResult2 is also
    // equal to (70,100,150,220,240,352) 
    Matrix matrixResult2 = matrix1 * matrix2;
}

注釈

次の表は、構造体のレイアウトを Matrix 示しています。

M11 M12 0
M21 M22 0
OffsetX OffsetY 1

適用対象