avoid rouding to 0 wave measures in show_node_measures()

This commit is contained in:
stefan schippers 2024-03-30 13:00:39 +01:00
parent 7756769a4e
commit 547bdec018
2 changed files with 3 additions and 2 deletions

View File

@ -329,6 +329,7 @@ void backannotate_at_cursor_pos(int cursor, int i, Graph_ctx *gr)
dbg(1, " : p=%d\n", p);
for(i = 0; i < raw->nvars; ++i) {
raw->cursor_a_val[i] = interpolate_yval(i, (p < ofs_end), p, cursorpos, sweep_idx);
dbg(1, "backannotate_at_cursor_pos(): cursor_a_val[%d] = %g\n", i, raw->cursor_a_val[i]);
}
dbg(1, " : cursor_a_val[0]=%g\n", raw->cursor_a_val[0]);
}

View File

@ -3120,8 +3120,8 @@ static void show_node_measures(
yy = xctx->raw->cursor_a_val[idx];
else
yy = 0.0;
if(XSIGN0(gr->gy1) != XSIGN0(gr->gy2) && fabs(yy) < 1e-4 * fabs(gr->gh)) yy = 0.0;
/* is below line necessary? */
/* if(XSIGN0(gr->gy1) != XSIGN0(gr->gy2) && fabs(yy) < 1e-9 * fabs(gr->gh)) yy = 0.0; */
if(yy != 0.0 && fabs(yy * gr->unity) < 1.0e-3) {
fmt1="%.2e";
fmt2="%.2e%c";