This commit is contained in:
Simon Gardling
2022-03-08 08:48:45 -05:00
parent 74be8357cf
commit 90cd4e81df
4 changed files with 7 additions and 16 deletions

View File

@@ -9,7 +9,7 @@ pub struct BackingFunction {
impl BackingFunction {
pub fn new(func_str: &str) -> Self {
let function = exmex::parse::<f64>(func_str).unwrap();
let derivative_1 = function.partial(0).unwrap_or(function.clone());
let derivative_1 = function.partial(0).unwrap_or_else(|_| function.clone());
// let derivative_2 = function.partial(0).unwrap_or(derivative_1.clone());
Self {