fix: correct typo nth_derviative -> nth_derivative

This commit is contained in:
Simon Gardling 2025-12-05 20:16:24 -05:00
parent 48fd49e386
commit df05601e26
Signed by: titaniumtown
GPG Key ID: 9AB28AC10ECE533D

View File

@ -43,7 +43,7 @@ pub struct FunctionEntry {
/// If displaying derivatives are enabled (note, they are still calculated for other purposes)
pub derivative: bool,
pub nth_derviative: bool,
pub nth_derivative: bool,
pub back_data: Vec<PlotPoint>,
pub integral_data: Option<(Vec<Bar>, f64)>,
@ -64,7 +64,7 @@ impl Hash for FunctionEntry {
fn hash<H: Hasher>(&self, state: &mut H) {
self.raw_func_str.hash(state);
self.integral.hash(state);
self.nth_derviative.hash(state);
self.nth_derivative.hash(state);
self.curr_nth.hash(state);
self.settings_opened.hash(state);
}
@ -128,7 +128,7 @@ impl Default for FunctionEntry {
raw_func_str: String::new(),
integral: false,
derivative: false,
nth_derviative: false,
nth_derivative: false,
back_data: Vec::new(),
integral_data: None,
derivative_data: Vec::new(),
@ -157,7 +157,7 @@ impl FunctionEntry {
.collapsible(false)
.show(ctx, |ui| {
ui.add(Checkbox::new(
&mut self.nth_derviative,
&mut self.nth_derivative,
"Display Nth Derivative",
));
@ -324,7 +324,7 @@ impl FunctionEntry {
debug_assert_eq!(self.derivative_data.len(), settings.plot_width + 1);
}
if self.nth_derviative && self.nth_derivative_data.is_none() {
if self.nth_derivative && self.nth_derivative_data.is_none() {
let data = self.generate_plot_data(self.curr_nth, &resolution_iter);
debug_assert_eq!(data.len(), settings.plot_width + 1);
self.nth_derivative_data = Some(data);
@ -434,10 +434,10 @@ impl FunctionEntry {
);
}
if self.nth_derviative
&& let Some(ref nth_derviative) = self.nth_derivative_data
if self.nth_derivative
&& let Some(ref nth_derivative) = self.nth_derivative_data
{
plot_ui.line(nth_derviative.clone().to_line().color(Color32::DARK_RED));
plot_ui.line(nth_derivative.clone().to_line().color(Color32::DARK_RED));
}
// Plot integral data