예제 #1
0
        /// <summary>The inverse of this matrix.</summary>
        /// <value>The inverse of this matrix.</value>
        /// <exception cref="InvalidOperationException">Thrown if this matrix is not invertible.</exception>
        public Matrix2D Inverse()
        {
            double determinant = this.Determinant;

            if (determinant == 0)
            {
                throw new InvalidOperationException("Cannot invert a singular matrix.");
            }

            Matrix2D inverse = new Matrix2D(this.M22 / determinant, -this.M12 / determinant, -this.M21 / determinant, this.M11 / determinant);

            return inverse;
        }
예제 #2
0
 public Matrix2D(Matrix2D m)
     : base(m)
 {
 }
예제 #3
0
 public Matrix2D(Matrix2D m) : base(m)
 {
 }