GLib.Rand¶
Fields¶
None
Methods¶
| double() | |
| double_range(begin, end) | |
| free() | |
| int() | |
| int_range(begin, end) | |
| set_seed(seed) | |
| set_seed_array(seed, seed_length) | 
Details¶
- 
class GLib.Rand¶
- The - GLib.Randstruct is an opaque data structure. It should only be accessed through the g_rand_* functions.- 
double()[source]¶
- Returns: - a random number - Return type: - float- Returns the next random - floatfrom self equally distributed over the range [0..1).
 - 
double_range(begin, end)[source]¶
- Parameters: - Returns: - a random number - Return type: - Returns the next random - floatfrom self equally distributed over the range [begin..`end`).
 - 
int()[source]¶
- Returns: - a random number - Return type: - int- Returns the next random #guint32 from self equally distributed over the range [0..2^32-1]. 
 - 
int_range(begin, end)[source]¶
- Parameters: - Returns: - a random number - Return type: - Returns the next random #gint32 from self equally distributed over the range [begin..`end`-1]. 
 - 
set_seed(seed)[source]¶
- Parameters: - seed ( - int) – a value to reinitialize the random number generator- Sets the seed for the random number generator - GLib.Randto seed.
 - 
set_seed_array(seed, seed_length)[source]¶
- Parameters: - Initializes the random number generator by an array of longs. Array can be of arbitrary size, though only the first 624 values are taken. This function is useful if you have many low entropy seeds, or if you require more then 32 bits of actual entropy for your application. - New in version 2.4. 
 
-