/** * \file * * * \brief Very simple rand() algorithm. * * \author Bernie Innocenti */ #include "rand.h" /** * This would really belong to libc */ int rand(void) { static unsigned long seed; /* Randomize seed */ seed = (seed ^ 0x4BAD5A39UL) + 6513973UL; return (int)(seed>>16); }