From ad4fadcef324bbeb86158ca23f06b2427a2c5fd8 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Mon, 14 Feb 2022 10:02:39 -0500 Subject: [PATCH] fixup --- src/func_plot.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/func_plot.rs b/src/func_plot.rs index dca1263..6942065 100644 --- a/src/func_plot.rs +++ b/src/func_plot.rs @@ -30,7 +30,7 @@ pub fn draw( chart.configure_mesh().x_labels(3).y_labels(3).draw()?; let data: Vec<(f32, f32)> = (1..=resolution) - .map(|x| ((x as f32 / resolution as f32) * (&absrange)) + &min_x) + .map(|x| ((x as f32 / resolution as f32) * absrange) + min_x) .map(|x| (x, func(x as f64) as f32)) .filter(|(_, y)| &min_y <= y && y <= &max_y) .collect();