Beispiel #1
0
        /// <summary>
        ///     While evaluating a numeric constant , return the _value
        /// </summary>
        /// <param name="cont"></param>
        /// <returns></returns>
        public override double Evaluate(RUNTIME_CONTEXT cont)
        {
            switch (_op)
            {
            case OPERATOR.PLUS:
                return(_ex1.Evaluate(cont));

            case OPERATOR.MINUS:
                return(-_ex1.Evaluate(cont));
            }

            return(Double.NaN);
        }
Beispiel #2
0
        /// <summary>
        ///     While evaluating a numeric constant , return the _value
        /// </summary>
        /// <param name="cont"></param>
        /// <returns></returns>
        public override double Evaluate(RUNTIME_CONTEXT cont)
        {
            double val = cont.T;

            return(val);
        }
Beispiel #3
0
        /// <summary>
        ///     While evaluating a numeric constant , return the _value
        /// </summary>
        /// <param name="cont"></param>
        /// <returns></returns>
        public override double Evaluate(RUNTIME_CONTEXT cont)
        {
            double val = _ex1.Evaluate(cont);

            return(Math.Cos(val));
        }