home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 2
/
Apprentice-Release2.iso
/
Source Code
/
C
/
Games
/
MacGnuGo 0.5e
/
gnugo.src
/
random.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1993-10-25
|
243 b
|
16 lines
|
[
TEXT/R*ch
]
#include "comment.header"
extern void seed(long int*);
void uRandom(long int *i)
/* random number generator */
{
if (*i == 0)
seed(i);
else
{
*i = *i * 137 % 3833;
if (*i < 0) *i = -*i;
}
} /* end random */