1 /* src/server/rrand.c */
4 #include <stdint.h> /* uint16_t */
5 #include "world.h" /* global world */
9 extern uint16_t rrand()
10 { /* Constants as recommended by POSIX.1-2001 (see man page rand(3)). */
11 world.seed = ((world.seed * 1103515245) + 12345) % 4294967296;
12 return (world.seed >> 16); /* Ignore less random least significant bits. */