Initialize the random number generator

rerandom expression

Re-initializes the random number generator with the seed value equal to the result of expression.

Example:

rerandom 4
repeat 3 [print rnorm 1] ;stała kolejność liczb
print "|---|
rerandom int timemilli
repeat 3 [print rnorm 1] ;przypadkowa kolejność liczb

Output:
First three numbers are always the same while the last three are random.

-0.0526078008115292
0.317708313465118
0.100123696029186
---
-0.156968370079994
1.50104558467865
-0.699948668479919

See also:

Table of Content