()
| 144 | } |
| 145 | |
| 146 | getFunctions() { |
| 147 | return { |
| 148 | Add: (args, compile) => args.map(compile).join(' ') + ' +', |
| 149 | Subtract: (args, compile) => compile(args[0]) + ' ' + compile(args[1]) + ' -', |
| 150 | Multiply: (args, compile) => args.map(compile).join(' ') + ' *', |
| 151 | Divide: (args, compile) => compile(args[0]) + ' ' + compile(args[1]) + ' /', |
| 152 | Power: (args, compile) => compile(args[0]) + ' ' + compile(args[1]) + ' ^', |
| 153 | Sin: (args, compile) => compile(args[0]) + ' sin', |
| 154 | Cos: (args, compile) => compile(args[0]) + ' cos', |
| 155 | Sqrt: (args, compile) => compile(args[0]) + ' sqrt', |
| 156 | }; |
| 157 | } |
| 158 | |
| 159 | createTarget(options = {}) { |
| 160 | const fns = this.getFunctions(); |
no test coverage detected