change keypads on scale, scale handling

This commit is contained in:
TT 2017-02-03 21:18:33 +09:00
parent c30a2730f3
commit ee6f5a9d83
3 changed files with 60 additions and 11 deletions

4
plot.c
View file

@ -481,7 +481,7 @@ trace_into_index(int x, int t, int i, float coeff[2])
int y = 0;
float v = 0;
float refpos = 8 - trace[t].refpos;
float scale = trace[t].scale;
float scale = 1 / trace[t].scale;
switch (trace[t].type) {
case TRC_LOGMAG:
v = refpos - logmag(coeff) * scale;
@ -498,7 +498,7 @@ trace_into_index(int x, int t, int i, float coeff[2])
case TRC_SMITH:
//case TRC_ADMIT:
case TRC_POLAR:
cartesian_scale(coeff[0], coeff[1], &x, &y, trace[t].scale);
cartesian_scale(coeff[0], coeff[1], &x, &y, scale);
return INDEX(x +CELLOFFSETX, y, i);
break;
}