Example #1
0
        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;
        }
Example #2
0
        public static double HighEigenvalue(this SymmetricMatrix2 @this)
        {
            var halfTrace = @this.Trace() / 2;

            return(halfTrace + BasicMath.Sqrt(halfTrace * halfTrace - @this.Det()));
        }