should be using 'tuple_windows' instead

This commit is contained in:
Simon Gardling 2022-03-23 20:59:20 -04:00
parent 3ef61b889a
commit fe4f44718e

View File

@ -185,7 +185,7 @@ pub fn newtons_method(
f_1: &dyn Fn(f64) -> f64,
) -> Vec<f64> {
data.iter()
.tuples()
.tuple_windows()
.filter(|(prev, curr)| !(prev.y.is_nan() | curr.y.is_nan()))
.map(|(prev, curr)| {
if prev.y.signum() != curr.y.signum() {