Method RandomInterface()->random()
- Method
random
arrayrandom(mappingm)- Description
Returns a random index-value pair from the mapping.
Array mixed0The index of the mapping entry.
mixed1The value f the mapping entry.
- Throws
Throws an exception if the mapping is empty.
- Method
random
floatrandom(floatmax)- Description
This function returns a random number in the range
0 .. max-ɛ.- See also
- Method
random
intrandom(intmax)- Description
This function returns a random number in the range
0 .. max-1.- See also
- Method
random
mixedrandom(objecto)- Description
If random is called with an object, lfun::_random will be called in the object.
- Throws
Throws an exception if the object doesn't have a _random method.
- See also
- Method
random
mixedrandom(array|multisetx)- Description
Returns a random element from x.
- Throws
Throws an exception if the array or multiset is empty.