remove dead code
This commit is contained in:
parent
30c424ebd9
commit
cc2722e58c
@ -77,7 +77,6 @@ impl FunctionEntry {
|
|||||||
self.func_str = func_str.clone();
|
self.func_str = func_str.clone();
|
||||||
self.function = BackingFunction::new(&func_str);
|
self.function = BackingFunction::new(&func_str);
|
||||||
self.output.invalidate_whole();
|
self.output.invalidate_whole();
|
||||||
self.output.invalidate_points();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
self.derivative = derivative;
|
self.derivative = derivative;
|
||||||
@ -153,7 +152,6 @@ impl FunctionEntry {
|
|||||||
|
|
||||||
let step = (self.integral_min_x - self.integral_max_x).abs() / (self.integral_num as f64);
|
let step = (self.integral_min_x - self.integral_max_x).abs() / (self.integral_num as f64);
|
||||||
|
|
||||||
let mut last_positive: Option<bool> = None;
|
|
||||||
let mut area: f64 = 0.0;
|
let mut area: f64 = 0.0;
|
||||||
let data2: Vec<(f64, f64)> = (0..self.integral_num)
|
let data2: Vec<(f64, f64)> = (0..self.integral_num)
|
||||||
.map(|e| {
|
.map(|e| {
|
||||||
@ -174,10 +172,6 @@ impl FunctionEntry {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if last_positive.is_none() {
|
|
||||||
last_positive = Some(x.is_sign_positive());
|
|
||||||
}
|
|
||||||
|
|
||||||
if !y.is_nan() {
|
if !y.is_nan() {
|
||||||
area += y * step;
|
area += y * step;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -42,11 +42,6 @@ impl FunctionOutput {
|
|||||||
|
|
||||||
pub fn invalidate_derivative(&mut self) { self.derivative = None; }
|
pub fn invalidate_derivative(&mut self) { self.derivative = None; }
|
||||||
|
|
||||||
pub fn invalidate_points(&mut self) {
|
|
||||||
self.extrema = None;
|
|
||||||
self.roots = None;
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn display(
|
pub fn display(
|
||||||
&self, plot_ui: &mut PlotUi, func_str: &str, derivative_str: &str, step: f64,
|
&self, plot_ui: &mut PlotUi, func_str: &str, derivative_str: &str, step: f64,
|
||||||
derivative_enabled: bool,
|
derivative_enabled: bool,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user