๐ฒ rnd
rnd
The rnd module provides facilities to introduce randomness in the composition.
Cookbook
Get a random number between two values
Reference
Functions:
Name | Description |
---|---|
between |
Get a random number between two values. |
one_in |
Returns True with a chance of 1 in |
between(begin, end)
Get a random number between two values.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
begin
|
float
|
The lower bound. |
required |
end
|
float
|
The upper bound. |
required |
one_in(chance)
Returns True with a chance of 1 in chance
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
chance
|
int
|
The chance of returning True. |
required |