deadbeef_rand.c File Reference

#include "deadbeef_rand.h"

Go to the source code of this file.

Functions

uint32_t deadbeef_rand ()
 Generate a 32-bit random number.
void deadbeef_srand (uint32_t seed)
 Seed the deadbeef random number generator.


Function Documentation

uint32_t deadbeef_rand (  ) 

Generate a 32-bit random number.

Before using this function, you should seed the generator by calling deadbeef_srand().

Definition at line 11 of file deadbeef_rand.c.

void deadbeef_srand ( uint32_t  seed  ) 

Seed the deadbeef random number generator.

Starting from the same seed, multiple runs of the deadbeef random number generator will generate identical sequences of pseudo-random numbers. This is sometime useful. In cases where it is desirable to have different runs of the generator generate different sequences, you should seed them with different seeds.

Parameters:
seed The value to seed the deadbeef generator with

Definition at line 27 of file deadbeef_rand.c.


Generated on Thu Dec 6 14:01:04 2007 for deadbeef_rand by  doxygen 1.5.1