# 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 .. <a class='ms reference' href='../predef_3A_3A/random.html'>max-1`.

See also

  random_seed()

Method random

  ``float` random(`float` `max`)`

Description

  This function returns a random number in the range `0 .. <a class='ms reference' href='../predef_3A_3A/random.html'>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.