public int GetChWidth(int n) { int ans; lock (this.pidMutex) { PID ch = this.pids[n - 1]; ans = (int)Math.Round(ch.GetValue() * ch.GetSpan() + ch.GetOffset()); } return(ans); }
public int GetChInWidth(int n) { int ans; byte val; lock (this.chInMutex) { val = this.chIn[n - 1]; } lock (this.pidMutex) { PID pid = this.pids[n - 1]; ans = (int)Math.Round(val * pid.GetSpan() + pid.GetOffset()); } return(ans); }