compileFunction2
fun compileFunction2(expression: String, parameter0: String, parameter1: String, constants: Map<String, Double> = mapOf(), functions: FunctionExtensions = FunctionExtensions.EMPTY, error: (p0: Double, p1: Double) -> Double = { _, _ -> 0.0 }): (p0: Double, p1: Double) -> Double(source)
Compile a (Double, Double)->Double function from an expression string
Parameters
expression
the expression string to be compiled
parameter0
the name of the first parameter
parameter1
the name of the second parameter
constants
a map of named constant values that can be referred from the expression
functions
a map of named functions that can be invoked from the expression
error
in case the expression fails to compile or evaluate, this function is invoked instead