Module:Random/doc: Difference between revisions

Content deleted Content added
add item function
Number: more precise description
Line 10:
 
The arguments <code>m</code> and <code>n</code> may be omitted, but if specified must be convertible to integers.
* With no arguments, returns a real number in the range <math>[0,1)</math>.
* With one argument, returns an integer in the range <math>[1,m]</math>. <code>''m''</code> must be positive.
* With two arguments, returns an integer in the range <math>[m,n]</math>. <code>''m''</code> and <code>''n''</code> can be either positive or negative; however,<code>''n''</code> must be greater than or equal to <code>''m''</code>, otherwise it is ignored and the module returns an integer in the range <math>[1,m]</math>.
 
'''Examples''' <small>({{purge|refresh}})</small>