From b26573656a5fdd2b87b0096181b4a15cdacee5eb Mon Sep 17 00:00:00 2001 From: donandren Date: Wed, 9 Mar 2016 15:56:40 +0200 Subject: [PATCH] HasInverse Property property of Matrix --- src/Perspex.SceneGraph/Matrix.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Perspex.SceneGraph/Matrix.cs b/src/Perspex.SceneGraph/Matrix.cs index baf38fb767..121ad1667d 100644 --- a/src/Perspex.SceneGraph/Matrix.cs +++ b/src/Perspex.SceneGraph/Matrix.cs @@ -53,6 +53,11 @@ namespace Perspex /// public bool IsIdentity => Equals(Identity); + /// + /// HasInverse Property - returns true if this matrix is invertable, false otherwise. + /// + public bool HasInverse => GetDeterminant() != 0; + /// /// The first element of the first row /// @@ -209,6 +214,7 @@ namespace Perspex return (_m11 * _m22) - (_m12 * _m21); } + /// /// Returns a boolean indicating whether the matrix is equal to the other given matrix. ///