4
* depends on gtypes.inc
10
PGRand = pointer; // check please
12
{ GRand - a good and fast random number generator: Mersenne Twister
13
see http://www.math.keio.ac.jp/~matumoto/emt.html for more info.
14
The range functions return a value in the intervall [begin, end).
16
int_range -> [begin..end-1]
18
double_range -> [begin..end)
21
function g_rand_new_with_seed(seed:guint32):PGRand;cdecl;external gliblib name 'g_rand_new_with_seed';
23
function g_rand_new:PGRand;cdecl;external gliblib name 'g_rand_new';
25
procedure g_rand_free(rand:PGRand);cdecl;external gliblib name 'g_rand_free';
27
procedure g_rand_set_seed(rand:PGRand; seed:guint32);cdecl;external gliblib name 'g_rand_set_seed';
29
function g_rand_boolean(rand : PGRand) : gboolean;
31
function g_rand_int(rand:PGRand):guint32;cdecl;external gliblib name 'g_rand_int';
33
function g_rand_int_range(rand:PGRand; _begin:gint32; _end:gint32):gint32;cdecl;external gliblib name 'g_rand_int_range';
35
function g_rand_double(rand:PGRand):gdouble;cdecl;external gliblib name 'g_rand_double';
37
function g_rand_double_range(rand:PGRand; _begin:gdouble; _end:gdouble):gdouble;cdecl;external gliblib name 'g_rand_double_range';
39
procedure g_random_set_seed(seed:guint32);cdecl;external gliblib name 'g_random_set_seed';
41
function g_random_boolean : gboolean;
43
function g_random_int:guint32;cdecl;external gliblib name 'g_random_int';
45
function g_random_int_range(_begin:gint32; _end:gint32):gint32;cdecl;external gliblib name 'g_random_int_range';
47
function g_random_double:gdouble;cdecl;external gliblib name 'g_random_double';
49
function g_random_double_range(_begin:gdouble; _end:gdouble):gdouble;cdecl;external gliblib name 'g_random_double_range';