Exemple #1
0
        public override IBaseMathOperator CalculateSimplyfy()
        {
            var sin = new SinMathOperator();

            sin.Instantiate(new [] { A.Simplyfy() });
            return(sin);
        }
        public override IBaseMathOperator Derivate()
        {
            if (IsConstant())
            {
                return(new ConstantMathOperator(0));
            }

            var sin = new SinMathOperator();

            sin.Instantiate(new [] { A });
            var multiply = new MultiplyMathOperator();

            multiply.Instantiate(new IBaseMathOperator[] { new ConstantMathOperator(-1), sin });

            var result = new MultiplyMathOperator();

            result.Instantiate(new [] { A.Derivate(), multiply });
            return(result);
        }