rand.c

Go to the documentation of this file.
00001 
00040 #include "rand.h"
00041 
00045 int rand(void)
00046 {
00047     static unsigned long seed;
00048 
00049     /* Randomize seed */
00050     seed = (seed ^ 0x4BAD5A39UL) + 6513973UL;
00051 
00052     return (int)(seed>>16);
00053 }