@head @module random @title random: Random number generation

This module contains functions for creating pseudo-random numbers.

Functions

@fun Random(n as Int) as Int @desc Return a pseudo-random integer in range 0, 1, ..., n − 1. @end @fun RandomFloat() as Float @desc Return a pseudo-random float x so that 0 <= x < 1. @end @fun Seed([seed as Int]) @desc Initialize the random number generator with the specified seed. If two program instances initialize the random number generator with the same seed value, the generated random numbers are equivalent if the same sequence of function calls is used to generate the random numbers. If the seed is missing, the seed value is taken from the current system time. @note Different random numbers may be generated on different operating systems and on different versions of the Alore runtime. @end @end