tiny rewrite, (integer + integer)/2
This commit is contained in:
parent
9ee308a2a5
commit
10615d5e73
|
|
@ -1,3 +1,8 @@
|
|||
2011-06-23 Robert Larice
|
||||
* src/ciderlib/oned/onemesh.c ,
|
||||
* src/spicelib/devices/nbjt/nbjttemp.c :
|
||||
tiny rewrite, (integer + integer)/2
|
||||
|
||||
2011-06-23 Robert Larice
|
||||
* src/frontend/evaluate.c ,
|
||||
* src/misc/hash.c ,
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ adjustBaseContact(ONEdevice *pDevice, int indexEB, int indexBC)
|
|||
/* Initialize the base contact to be the center of the two junctions */
|
||||
/* This should take care of uniform dopings. */
|
||||
|
||||
midPoint = (int)(0.5 * (indexEB + indexBC));
|
||||
midPoint = (indexEB + indexBC) / 2;
|
||||
newBaseIndex = midPoint;
|
||||
|
||||
if (pBaseNode->baseType == P_TYPE) {
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ NBJTtemp(GENmodel *inModel, CKTcircuit *ckt)
|
|||
printf("Warning: base contact not on node -- adjusting contact\n");
|
||||
}
|
||||
NBJTjunctions(pDevice, &indexBE, &indexBC);
|
||||
pDevice->baseIndex = (int)(0.5 * (indexBE + indexBC));
|
||||
pDevice->baseIndex = (indexBE + indexBC) / 2;
|
||||
}
|
||||
if (inst->NBJTtype == PNP) {
|
||||
pDevice->elemArray[pDevice->baseIndex]->pNodes[0]->baseType = N_TYPE;
|
||||
|
|
|
|||
Loading…
Reference in New Issue