X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=NeXT%2Frandom.h;fp=NeXT%2Frandom.h;h=787368d6220380def19774ce5d1035e310d26bcb;hb=7554d5fef3f478ca0f9c8911522d7c1783989eae;hp=0000000000000000000000000000000000000000;hpb=f9e2af5a81ac29239cfa4ebd8dc2c40792eafcbb;p=ppp.git diff --git a/NeXT/random.h b/NeXT/random.h new file mode 100644 index 0000000..787368d --- /dev/null +++ b/NeXT/random.h @@ -0,0 +1,14 @@ +/* + * Because the standard library random number + * functions are not availble at the kernel level + * I wrote this simple random number generator. + * + * It uses the multiplicative congruential method. + * See pg 263 of Banks and Carson "Discrete-Event + * System Simulation". + * + */ + +void srand(unsigned i); +unsigned rand(void); +float frand(void);