Ejemplo n.º 1
0
        bool AssertEquality(Variable[] valuePairs)
        {
            var dif = Math.Abs(LeftSide.EvaluateFor(valuePairs) - RightSide.EvaluateFor(valuePairs));

            if (dif == 0)
            {
                Console.WriteLine("Right side = Left side");
                return(true);
            }

            if (dif < 0.1)
            {
                Console.WriteLine("Right side is almost same as Left side, difference = {0}", dif);
                return(true);
            }
            return(false);
        }