mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
c8fb341e1a
Split random_select into random_select and random_select_many. git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1161 0fc631ac-6414-0410-93d0-97cfa31319b6
27 lines
837 B
Plaintext
27 lines
837 B
Plaintext
Function: random_int
|
|
|
|
DOC_MSE_VERSION: since 0.3.7
|
|
|
|
--Usage--
|
|
> random_int(begin: lower bound, end: upper bound)
|
|
|
|
Returns a random [[type:int]] between @begin@ and @end@.
|
|
By default @begin: 0@ is used.
|
|
The random number @x@ will be in the range @begin <= x < end@.
|
|
|
|
Since the result is random, calling the function twice will give a different answer.
|
|
|
|
--Parameters--
|
|
! Parameter Type Default Description
|
|
| @begin@ [[type:int]] @0@ Lower end point of the range the number will be in.
|
|
| @end@ [[type:int]] ''required'' Upper end point of the range the number will be in.
|
|
|
|
--Examples--
|
|
> random_int(end:10) == 2
|
|
> random_int(end:10) == 5
|
|
> random_int(begin:100, end:200) == 43
|
|
|
|
--See also--
|
|
| [[fun:random_real]] Generate a random [[type:double]].
|
|
| [[fun:random_boolean]] Generate a random [[type:boolean]].
|