diff --git a/src/math/mod.rs b/src/math/mod.rs index 72d96f6d..c01f9e7d 100644 --- a/src/math/mod.rs +++ b/src/math/mod.rs @@ -52,7 +52,7 @@ pub fn integrate_1d(f: &dyn Fn(&f64) -> f64, x_min: &f64, x_max: &f64, num_point pub fn integrate_1d_grid(f: &dyn Fn(&f64) -> f64, grid: &[f64], dx: &f64) -> f64 { - grid.iter().map(|x| f(x)).sum::()*dx + grid.iter().map(f).sum::()*dx } pub fn integrate_2d(f: &dyn Fn(&f64, &f64) -> f64, x_min: &f64, x_max: &f64, y_min: &f64, y_max: &f64, num_points: &u128) -> f64