Difference between revisions of "Template:Pseudorand"
From Twilight Heroes Wiki
(New page: <includeonly>{{#expr: {{#time: U}} mod {{{1}}}}}</includeonly><noinclude>This template accepts one parameter X, and will return a different number every time it is used, between 0 and X-1....) |
m |
||
Line 1: | Line 1: | ||
− | <includeonly>{{#expr: {{#time: U}} mod {{{1}}}}}</includeonly><noinclude>This template accepts one parameter X, and will return a different number every time it is used, between 0 and X-1. However, the number isn't random, it is based on the current time | + | <includeonly>{{#expr: {{#time: U}} mod {{{1}}}}}</includeonly><noinclude>This template accepts one parameter X, and will return a different number every time it is used, between 0 and X-1. However, the number isn't random, it is based on the current time. |
For example, '''<nowiki>{{pseudorand|13}}</nowiki>''' returns {{#expr: {{#time: U}} mod 13}}.[[Category:Templates]]</noinclude> | For example, '''<nowiki>{{pseudorand|13}}</nowiki>''' returns {{#expr: {{#time: U}} mod 13}}.[[Category:Templates]]</noinclude> |
Revision as of 07:03, 2 August 2009
This template accepts one parameter X, and will return a different number every time it is used, between 0 and X-1. However, the number isn't random, it is based on the current time.
For example, {{pseudorand|13}} returns 7.