//This function generates a pseudo random integer number
//between 1 and Lim
//
unsigned char Number(int Lim,int Y)
{
unsigned char Result;
static unsigned int Y;
Y=(Y*32719+3)%32749;
Result=((Y%Lim)+1);
return Result;
}
这段代码中“Y=(Y*32719+3)%32749;”这一句是怎么理解的呢? |