Pike v8.0 release 1738

Method random()


Method random

mixed random(object o)

Description

If random is called with an object, lfun::random will be called in the object.

See also

lfun::_random()


Method random

int random(int max)

Description

This function returns a random number in the range 0 .. max-1.

See also

random_seed()


Method random

float random(float max)

Description

This function returns a random number in the range 0 .. max-ɛ.

See also

random_seed()


Method random

mixed random(array|multiset x)

Description

Returns a random element from x.


Method random

array random(mapping m)

Description

Returns a random index-value pair from the mapping.