b********p 发帖数: 875 | 1 double randomGen()
{
int kkk,iran;
kkk = iSeed1 / 53668;
iSeed1 = 40014 * (iSeed1 - kkk * 53668) - kkk * 12211;
if(iSeed1 < 0) iSeed1 = iSeed1 + 2147483563;
kkk = iSeed2 / 52774;
iSeed2 = 40692 * (iSeed2 - kkk * 52774) - kkk * 3791;
if(iSeed2 < 0) iSeed2 = iSeed2 + 2147483399;
iran = iSeed1 - iSeed2;
if(iran < 1) iran = iran + 2147483562;
return (iran * 4.656612873e-10);
} |
|