public static void ComputeEigenvalues(this SymmetricMatrix2 @this, out double low, out double high) { var halfTrace = @this.Trace() / 2; var disc = BasicMath.Sqrt(halfTrace * halfTrace - @this.Det()); low = halfTrace - disc; high = halfTrace + disc; }
public static double HighEigenvalue(this SymmetricMatrix2 @this) { var halfTrace = @this.Trace() / 2; return(halfTrace + BasicMath.Sqrt(halfTrace * halfTrace - @this.Det())); }