Beispiel #1
0
        public string ParseLinearEquationToString(LinearEquation coefficients)
        {
            var pairs = new List <KeyValuePair <string, int> >()
            {
                new KeyValuePair <string, int>("x", coefficients.XTerm),
                new KeyValuePair <string, int>("y", coefficients.YTerm),
                new KeyValuePair <string, int>("", coefficients.ConstantTerm)
            };


            return($"{ParseCoefficientVariablePairList(pairs, pairs.Count)}=0");
        }
        public static string ParseLinearEquationToString(LinearEquation equation)
        {
            var pairs = new List <KeyValuePair <string, int> >()
            {
                new KeyValuePair <string, int>("x", equation.XTerm),
                new KeyValuePair <string, int>("y", equation.YTerm),
                new KeyValuePair <string, int>("", equation.ConstantTerm)
            };


            return(ParseCoefficientVariablePairList(pairs, pairs.Count));
        }