Mul() public static méthode

public static Mul ( CMatrix, p_ma, CMatrix, p_mb ) : CMatrix,
p_ma CMatrix,
p_mb CMatrix,
Résultat CMatrix,
Exemple #1
0
    // Use this for initialization
    void Start()
    {
        CMatrix a = new CMatrix(2, 2);
        CMatrix b = new CMatrix(2, 1);

        a[0, 0] = 1.0f; a[0, 1] = 0.0f;
        a[1, 0] = 2.0f; a[1, 1] = 3.0f;

        b[0, 0] = 2.0f;
        b[1, 0] = 4.0f;

        CMatrix g = CMatrix.Mul(a, b);

        Debug.Log(g.m_rows + "x" + g.m_cols);
        Debug.Log(g[1, 0] + "==" + (a[1, 0] * b[0, 0] + a[1, 1] * b[1, 0]));
    }
Exemple #2
0
 public static CMatrix operator *(CMatrix p_ma, CMatrix p_mb)
 {
     return(CMatrix.Mul(p_ma, p_mb));
 }