## random(var x)

Returns a random number.
### Parameter:

**x** - upper limit for the random number (**0.001**..**10000**)
### Returns:

Positive fractional var less than **x**.
### Speed:

Fast### Remarks:

The var returned is
fractional, and is always
less than the upper limit. The random sequence starts always with the same
numbers, unless 'randomized' at game start by
random_seed().
### Example:

x = random(100); *// returns a number between 0.0 and 99.999999*
x = random(2)-1; *// returns a number between -1.0 and 0.999999*
x = integer(random(10)); *// returns a number between 0 and 9*

### See also:

random_seed
► latest
version online