Template:Pseudorand

From Twilight Heroes Wiki
Revision as of 06:56, 2 August 2009 by Muhandes (talk | contribs) (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....)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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. Due to a bug with the mod function it doesn't even use the microsecond time {{CURRENTTIMESTAMP}} but the time in seconds, making it even further away from being random.

For example, {{pseudorand|13}} returns 9.