Jump to content
Wikimedia Meta-Wiki

Template:Random number

From Meta, a Wikimedia project coordination wiki

53

Template documentation


Usage

[edit ]

Return a pseudo-random integer between 0 (included) and a modulus value (excluded).

Optional parameters

[edit ]
  • 1=modulus (default is 100 to return a random number between 0 and 99).
  • 2=seed (default is set from day of the year) is used so that different seeds will generate different random numbers on page (but generated numbers will be linearly spaced, by the value of the modulus).
  • 2=prime (default 67) ; may be used as well to generate different random numbers on page, but should be a prime (generated numbers will be unrelated).
The above documentation is transcluded from Template:Random number/doc. (edit | history)
Editors can experiment in this template’s sandbox (create | mirror) and testcases (create) pages.
Please add categories to the /doc subpage. Subpages of this template.

AltStyle によって変換されたページ (->オリジナル) /