Returns a random number.
Copy Code |
---|
double Rnd ( |
The return value depends on the type parameter. The following table describes the behavior of the function depending on the value of the value of type:
Parameter Value | Description |
---|---|
Less than zero | The same number every time, using type as the seed. |
Greater than zero | The next random number in the sequence. |
Equal to zero | The most recently generated number. |
The Rnd function returns a value less than 1, but greater than or equal to zero. The value of type determines how Rnd generates a random number as outlined in the above table.