# rnd

The rnd function returns a (pseudo) random number less than 1 but greater or equal to 0. The random number generator is initialized by means of an optional seed value. Afterwards, if no new seed is provided, the last generated number will be used as seed for the next random number. Without a previous initialization a value calculated from the system time will be used as seed value when rnd is used the first time.

Related keyword:

- float

### rnd([float seed]) return float

- Each time the rnd function is initialized with the same seed value, it shall repeat the same sequence of random numbers.

Example 1:

var float v_veeletlen := rnd( 1.9 );

The variable v_veeletlen will have a random initial value between 0 and 1. The argument of the function is an optional seed value used for the first time random value calculation. If it is omitted, the system time will be used as seed.