home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
333.lha
/
Lotto
/
rand.c
< prev
next >
Wrap
Text File
|
1989-12-28
|
273b
|
21 lines
/* rand.c - Eric Giguere - Transactor v2.6 */
static unsigned long next;
void srand(seed)
unsigned long seed;
{
next = seed;
}
#define A 1664525L
#define B 65536L
unsigned long rand(max)
unsigned long max;
{
next = A * next + 1L;
return (((next / B) * max) / B);
}