()
| 72 | } |
| 73 | |
| 74 | getFunctions(): CompiledFunctions { |
| 75 | return { |
| 76 | Add: (args, compile) => args.map(compile).join(' ') + ' +', |
| 77 | Subtract: (args, compile) => compile(args[0]) + ' ' + compile(args[1]) + ' -', |
| 78 | Multiply: (args, compile) => args.map(compile).join(' ') + ' *', |
| 79 | Divide: (args, compile) => compile(args[0]) + ' ' + compile(args[1]) + ' /', |
| 80 | Power: (args, compile) => compile(args[0]) + ' ' + compile(args[1]) + ' **', |
| 81 | Sin: (args, compile) => compile(args[0]) + ' sin', |
| 82 | Cos: (args, compile) => compile(args[0]) + ' cos', |
| 83 | Sqrt: (args, compile) => compile(args[0]) + ' sqrt', |
| 84 | }; |
| 85 | } |
| 86 | |
| 87 | createTarget(options: Partial<CompileTarget> = {}): CompileTarget { |
| 88 | const fns = this.getFunctions(); |
no test coverage detected