rewrite comments in english

This commit is contained in:
jacekpoz 2023-11-05 17:20:24 +01:00
parent b2b799e4a7
commit 2e063dfbf6
No known key found for this signature in database
GPG key ID: 94E812A8B12AAE3C

View file

@ -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::<f64> {
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::<f64> {
bounds: (-1.0..1.0),
function: Box::new(|x| 1.0 / (1.0 - (x * x)).sqrt()),