From 4806bb44ae31e0a458620336b2b8c1de6c91f1e9 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Fri, 4 Mar 2022 08:36:41 -0500 Subject: [PATCH] formatting and comments --- src/egui_app.rs | 2 +- src/function.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/egui_app.rs b/src/egui_app.rs index cec6e96..2447271 100644 --- a/src/egui_app.rs +++ b/src/egui_app.rs @@ -393,7 +393,7 @@ impl epi::App for MathApp { self.side_panel(ctx); } - // Central panel which contains the central plot along or an error when parsing + // Central panel which contains the central plot (or an error created when parsing) CentralPanel::default().show(ctx, |ui| { if !self.last_error.is_empty() { ui.centered_and_justified(|ui| { diff --git a/src/function.rs b/src/function.rs index 6d9df35..eca99bb 100644 --- a/src/function.rs +++ b/src/function.rs @@ -189,7 +189,7 @@ impl Function { let data2: Vec<(f64, f64)> = (1..=self.integral_num) .map(|e| { let x: f64 = ((e as f64) * step) + self.integral_min_x; - let step_offset = step * x.signum(); + let step_offset = step * x.signum(); // store the offset here so it doesn't have to be calculated multiple times let x2: f64 = x + step_offset; let (left_x, right_x) = match x.is_sign_positive() {