name lines

This commit is contained in:
Simon Gardling
2022-03-07 20:16:19 -05:00
parent b98aa4de26
commit a34e37e3f7
3 changed files with 22 additions and 7 deletions

View File

@@ -19,6 +19,8 @@ impl BackingFunction {
}
}
pub fn get_derivative_str(&self) -> &str { self.derivative_1.unparse() } // TODO: maybe pretty-ify the output here? idk, it's pretty ugly
pub fn get(&self, x: f64) -> f64 { self.function.eval(&[x]).unwrap_or(f64::NAN) }
pub fn derivative(&self, x: f64) -> f64 { self.derivative_1.eval(&[x]).unwrap_or(f64::NAN) }