This commit is contained in:
Simon Gardling 2022-03-29 21:49:29 -04:00
parent eeecf4bd74
commit a612aa1fbf

View File

@ -140,14 +140,14 @@ impl FunctionEntry {
0 => newtons_method_helper( 0 => newtons_method_helper(
&threshold, &threshold,
&range, &range,
&self.output.back.to_owned().unwrap(), &self.output.back.as_ref().unwrap(),
&|x: f64| self.function.get(x), &|x: f64| self.function.get(x),
&|x: f64| self.function.get_derivative_1(x), &|x: f64| self.function.get_derivative_1(x),
), ),
1 => newtons_method_helper( 1 => newtons_method_helper(
&threshold, &threshold,
&range, &range,
&self.output.derivative.to_owned().unwrap(), &self.output.derivative.as_ref().unwrap(),
&|x: f64| self.function.get_derivative_1(x), &|x: f64| self.function.get_derivative_1(x),
&|x: f64| self.function.get_derivative_2(x), &|x: f64| self.function.get_derivative_2(x),
), ),