random() : var

Returns a random number from the range between -1 and +1.

random(var max) : var

Returns a random number from the range between 0 and max.

seed(int s)

Determines a fixed random number sequence, dependent on the "seed" s.

Example:

if(is(INITRUN)) 
  seed(365);
...
if(random() > 0) ... // true in 50% of all cases

See also:

abs, sign, randomize, Detrend

► latest version online