Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
rand [2019/05/18 18:00]
a.leofreddi [Rand]
rand [2019/05/18 18:02] (current)
a.leofreddi
Line 2: Line 2:
 Returns a random number in between [0, 1). Please note that the random seed is bound to the evaluation interval start, so each ''​rand()''​ call for any interval sharing the same start time will return the same value. Returns a random number in between [0, 1). Please note that the random seed is bound to the evaluation interval start, so each ''​rand()''​ call for any interval sharing the same start time will return the same value.
  
-Whenever you need to get different random values for the same interval (when using multiple ''​rand()''​ calls to simulate different inputs), you can explicity pass an integer argument as a seed. That one will be used, along the evaluation interval start, as a seed for the random generator.+An optional seed argument ​can be passed additionally:​ it will be used, along the evaluation interval start, as a seed for the random generator. 
 ===== Signature ===== ===== Signature =====
 <​code>​ <​code>​
  • rand.txt
  • Last modified: 2019/05/18 18:02
  • by a.leofreddi