From 6551235093fd81a2982ee0b3f914ecd1a0027234 Mon Sep 17 00:00:00 2001 From: Hamlet Tanyavong <34531738+HamletTanyavong@users.noreply.github.com> Date: Tue, 23 Apr 2024 06:41:52 -0500 Subject: [PATCH] Update Matrix2x2.cs - Fix determinant calculation --- src/Mathematics.NET/LinearAlgebra/Matrix2x2.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mathematics.NET/LinearAlgebra/Matrix2x2.cs b/src/Mathematics.NET/LinearAlgebra/Matrix2x2.cs index 978c0c1b..19775cdf 100644 --- a/src/Mathematics.NET/LinearAlgebra/Matrix2x2.cs +++ b/src/Mathematics.NET/LinearAlgebra/Matrix2x2.cs @@ -189,7 +189,7 @@ public string ToString(string? format, IFormatProvider? provider) public static Matrix2x2 CreateDiagonal(T e11, T e22) => new(e11, T.Zero, T.Zero, e22); - public readonly T Determinant() => X1.X1 * X2.X2 - X1.X2 - X2.X1; + public readonly T Determinant() => X1.X1 * X2.X2 - X1.X2 * X2.X1; public readonly Matrix2x2 Inverse() {