ReactOS 0.4.16-dev-297-gc569aee
random_number.h File Reference
#include <stddef.h>
Include dependency graph for random_number.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

unsigned random_number (size_t range)
 

Variables

unsigned random_base
 

Function Documentation

◆ random_number()

unsigned random_number ( size_t  range)

Definition at line 26 of file random_number.cpp.

27{
28#if !defined( __SGI_STL )
29 if (range == 0) return 0;
30 return (unsigned)(EH_STD::rand() + EH_STD::rand()) % range;
31#else
32 static EH_STD::subtractive_rng rnd;
33 if (range==0) return 0;
34 return rnd(range);
35#endif
36}
GLenum GLint * range
Definition: glext.h:7539

Referenced by TestClass::get_random(), MakeRandomValue(), test_hash_resize< T >::operator()(), prepare_insert_n(), prepare_insert_range(), test_bit_vector(), test_deque(), test_hash_map(), test_hash_multimap(), test_hash_multiset(), test_hash_set(), test_list(), test_map(), test_multimap(), test_multiset(), test_rope(), test_set(), test_slist(), test_string(), and test_vector().

Variable Documentation

◆ random_base