Exemplo n.º 1
0
            MathOpcode CreateMathOpcode(MathOperator op)
            {
                MathOpcode opcode = null;

                switch (op)
                {
                case MathOperator.None:
                    Fx.Assert("");
                    break;

                case MathOperator.Plus:
                    opcode = new PlusOpcode();
                    break;

                case MathOperator.Minus:
                    opcode = new MinusOpcode();
                    break;

                case MathOperator.Div:
                    opcode = new DivideOpcode();
                    break;

                case MathOperator.Multiply:
                    opcode = new MultiplyOpcode();
                    break;

                case MathOperator.Mod:
                    opcode = new ModulusOpcode();
                    break;

                case MathOperator.Negate:
                    opcode = new NegateOpcode();
                    break;
                }

                return(opcode);
            }
Exemplo n.º 2
0
            MathOpcode CreateMathOpcode(MathOperator op)
            {
                MathOpcode opcode = null;
                switch (op)
                {
                    case MathOperator.None:
                        Fx.Assert("");
                        break;

                    case MathOperator.Plus:
                        opcode = new PlusOpcode();
                        break;
                    case MathOperator.Minus:
                        opcode = new MinusOpcode();
                        break;
                    case MathOperator.Div:
                        opcode = new DivideOpcode();
                        break;
                    case MathOperator.Multiply:
                        opcode = new MultiplyOpcode();
                        break;
                    case MathOperator.Mod:
                        opcode = new ModulusOpcode();
                        break;
                    case MathOperator.Negate:
                        opcode = new NegateOpcode();
                        break;
                }

                return opcode;
            }