Qdr /

Random

Qdr.Rand History

Hide minor edits - Show changes to output

Added lines 1-35:
(:title Random:)
(:category: Function :)
(:Summary: Generate a random value. :)
(:format: @@rand(min, max)@@ :)
(:sinceVersion: 1.3.5 :)
(:lastVersion: 2.0.0 :)


{$:Summary}

! Usage
:Format: {$:format}

:Parameters: \
@@min@@: Lower boundary.\\
@@max@@: Upper boundary.\\

:Returns: A random value between ''min'' and ''max'', included.

! Description
The values of ''min'' and ''max'' are evaluated. The function returns a random value between these two values (included).

The values of ''min'' and ''max'' can be freely swapped such that @@rand(1, 6)@@ and @@rand(6, 1)@@ will both returns exactly the same values.

! Examples
The formula @@rand(-1, 1)@@ will return a random value that is either -1, 0 or 1.\\
The formula @@rand(1, 6)@@ is exactly the same as @@1d6@@.\\
The formula @@rand(1, 13)@@ will return a random value between 1 and 13:\\
[5] = 5\\
[8] = 8\\
[13] = 13\\

! History
Supported since Quick Dice Roller {$:sinceVersion}\\
New output since Quick Dice Roller {$:lastVersion}\\
Page last modified on October 23, 2014, at 08:41 PM