0ad/source/lib/rand.h
Ykkrosh 7a4dd7b473 Set svn:eol-style=native
This was SVN commit r6828.
2009-04-18 16:14:48 +00:00

22 lines
591 B
C

/**
* =========================================================================
* File : rand.h
* Project : 0 A.D.
* Description : pseudorandom number generator
* =========================================================================
*/
// license: GPL; see lib/license.txt
#ifndef INCLUDED_RAND
#define INCLUDED_RAND
/**
* return random integer in [min, max).
* avoids several common pitfalls; see discussion at
* http://www.azillionmonkeys.com/qed/random.html
**/
LIB_API size_t rand(size_t min_inclusive, size_t max_exclusive);
#endif // #ifndef INCLUDED_RAND