Searched refs:grandom (Results 1 – 2 of 2) sorted by relevance
25 GoomRandom *grandom = (GoomRandom *) malloc (sizeof (GoomRandom)); in goom_random_init() local28 grandom->pos = 1; in goom_random_init()29 goom_random_update_array (grandom, GOOM_NB_RAND); in goom_random_init()30 return grandom; in goom_random_init()34 goom_random_free (GoomRandom * grandom) in goom_random_free() argument36 free (grandom); in goom_random_free()40 goom_random_update_array (GoomRandom * grandom, int numberOfValuesToChange) in goom_random_update_array() argument44 grandom->array[grandom->pos++] = ((rand () << 16) + rand ()) / 127; in goom_random_update_array()46 grandom->array[grandom->pos++] = rand () / 127; in goom_random_update_array()
36 void goom_random_free(GoomRandom *grandom);38 inline static int goom_random(GoomRandom *grandom) { in goom_random() argument40 grandom->pos++; /* works because pos is an unsigned short */ in goom_random()41 return grandom->array[grandom->pos]; in goom_random()44 inline static int goom_irand(GoomRandom *grandom, int i) { in goom_irand() argument46 grandom->pos++; in goom_irand()47 return grandom->array[grandom->pos] % i; in goom_irand()51 void goom_random_update_array(GoomRandom *grandom, int numberOfValuesToChange);