refactor some variable usage in plot_raw_custom_data()

This commit is contained in:
Stefan Frederik 2022-02-12 13:29:18 +01:00
parent c6a7d8f9bb
commit fbeae175dd
1 changed files with 3 additions and 3 deletions

View File

@ -654,10 +654,10 @@ void plot_raw_custom_data(int sweep_idx, int first, int last, const char *expr)
double deriv = 0;
if( p == first ) {
deriv = 0;
stack1[i].prev = stack2[stackptr2 - 1];
stack1[i].prevy = stack2[stackptr2 - 1];
} else {
deriv = (stack2[stackptr2 - 1] - stack1[i].prev) / (x[p] - x[p - 1]);
stack1[i].prev = stack2[stackptr2 - 1] ;
deriv = (stack2[stackptr2 - 1] - stack1[i].prevy) / (x[p] - x[p - 1]);
stack1[i].prevy = stack2[stackptr2 - 1] ;
}
stack2[stackptr2 - 1] = deriv;
}