Function abs
Source pub fn abs(func: Function) -> Function
Expand description
Creates a Function equal to the absolute value of the passed Function
i.e f(x) ⟹ |f(x)|
Example:
let x = function::default();
let abs_of_x = abs(x);
assert_eq!(abs_of_x.call(-1.), 1.);