swap some `SWAP' arguments for readability
This commit is contained in:
parent
bd0bc3038b
commit
40a0cea0d2
|
|
@ -1232,7 +1232,7 @@ measure_parse_stdParams(
|
|||
/* dc: make m_from always less than m_to */
|
||||
if (cieq("dc", meas->m_analysis))
|
||||
if (meas->m_to < meas->m_from) {
|
||||
SWAP(double, meas->m_to, meas->m_from);
|
||||
SWAP(double, meas->m_from, meas->m_to);
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
|
|
|||
|
|
@ -830,10 +830,10 @@ plotit(wordlist *wl, char *hcopy, char *devname)
|
|||
ylims[1] = 1.0;
|
||||
}
|
||||
if (xlims[0] > xlims[1]) {
|
||||
SWAP(double, xlims[1], xlims[0]);
|
||||
SWAP(double, xlims[0], xlims[1]);
|
||||
}
|
||||
if (ylims[0] > ylims[1]) {
|
||||
SWAP(double, ylims[1], ylims[0]);
|
||||
SWAP(double, ylims[0], ylims[1]);
|
||||
}
|
||||
if (AlmostEqualUlps(xlims[0], xlims[1], 10)) {
|
||||
xlims[0] *= (xlims[0] > 0) ? 0.9 : 1.1;
|
||||
|
|
|
|||
|
|
@ -76,9 +76,9 @@ retry:
|
|||
*ckt->CKTirhsSpare = 0;
|
||||
*ckt->CKTirhsOld = 0;
|
||||
|
||||
SWAP(double *, ckt->CKTirhsOld, ckt->CKTirhs);
|
||||
SWAP(double *, ckt->CKTirhs, ckt->CKTirhsOld);
|
||||
|
||||
SWAP(double *, ckt->CKTrhsOld, ckt->CKTrhs);
|
||||
SWAP(double *, ckt->CKTrhs, ckt->CKTrhsOld);
|
||||
|
||||
return(OK);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,8 +76,8 @@ skip:
|
|||
*ckt->CKTirhsSpare = 0;
|
||||
*ckt->CKTirhsOld = 0;
|
||||
|
||||
SWAP(double *, ckt->CKTirhsOld, ckt->CKTirhs);
|
||||
SWAP(double *, ckt->CKTirhs, ckt->CKTirhsOld);
|
||||
|
||||
SWAP(double *, ckt->CKTrhsOld, ckt->CKTrhs);
|
||||
SWAP(double *, ckt->CKTrhs, ckt->CKTrhsOld);
|
||||
return(OK);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ NIiter(CKTcircuit *ckt, int maxIter)
|
|||
|
||||
|
||||
if( (ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC)) {
|
||||
SWAP(double *, ckt->CKTrhsOld, ckt->CKTrhs);
|
||||
SWAP(double *, ckt->CKTrhs, ckt->CKTrhsOld);
|
||||
error = CKTload(ckt);
|
||||
if(error) {
|
||||
return(error);
|
||||
|
|
@ -266,7 +266,7 @@ NIiter(CKTcircuit *ckt, int maxIter)
|
|||
}
|
||||
|
||||
/* build up the lvnim1 array from the lvn array */
|
||||
SWAP(double *, ckt->CKTrhsOld, ckt->CKTrhs);
|
||||
SWAP(double *, ckt->CKTrhs, ckt->CKTrhsOld);
|
||||
/*printf("after loading, after solving\n");*/
|
||||
/*CKTdump(ckt);*/
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue