csharp System.Windows.Media.Matrix.HasInverse类(方法)实例源码

下面列出了csharp System.Windows.Media.Matrix.HasInverse 类(方法)源码代码实例,从而了解它的用法。

作者:.NET开发    项目:System.Windows.Medi   
private Matrix inverseExample()
{
    
    // Creating a Matrix structure.
    Matrix myMatrix = new Matrix(5, 10, 15, 20, 25, 30);
                
    // Checking if myMatrix is invertible.
    if (myMatrix.HasInverse)
    {

        // Invert myMatrix. myMatrix is now 
        // equal to (-0.4, 0.2 , 0.3, -0.1, 1, -2) 
        myMatrix.Invert();
        
        // Return the inverted matrix.
        return myMatrix;
    }
    else
    {
        throw new InvalidOperationException("The matrix is not invertible.");
    }
}


问题


面经


文章

微信
公众号

扫码关注公众号