formatting and comments
This commit is contained in:
parent
e201d61045
commit
4806bb44ae
@ -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| {
|
||||
|
||||
@ -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() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user