diff --git a/src/main.rs b/src/main.rs index beac60f..852db25 100644 --- a/src/main.rs +++ b/src/main.rs @@ -50,8 +50,8 @@ fn get_sup( .map(|x| (x as f64) / multiplier) { let y = f(i); - // dla aproksymacji π, f(-1) i f(1) - // dawały ∞, ten if naprawia problem + // for the π approximation f(-1) and f(1) + // returned ∞, this if fixes that if sup.is_infinite() { sup = y; } @@ -135,7 +135,7 @@ fn graph_function( } fn main() { - // przykład z pdfu + // example from the homework pdf let i0 = Integral:: { bounds: (1.0..3.0), function: Box::new(|x| x.powi(3)), @@ -160,7 +160,7 @@ fn main() { }; graph_function("graphs/3.png", 50, &i3, 0.2); - // aproksymacja π + // π approximation let i_pi = Integral:: { bounds: (-1.0..1.0), function: Box::new(|x| 1.0 / (1.0 - (x * x)).sqrt()),