Difference between revisions of "GetRandomPercent"
Jump to navigation
Jump to search
Copied info, used the template for functions
imported>Geckbot m (Robot: Automated text replacement (-\[\[Category:(.*?)\(GECK 1.0\)\]\] +Category:\1(GECK 1.1))) |
imported>PoHa! (Copied info, used the template for functions) |
||
Line 1: | Line 1: | ||
{{ | {{Function | ||
|CSWikiPage = GetRandomPercent | |||
|origin = GECK1 | |||
|summary = Returns a random integer between 0 and 99 inclusive. | |||
|name = GetRandomPercent | |||
|returnVal = 0 to 99 | |||
|returnType = int | |||
|example = <pre>short rnd | |||
set rnd to GetRandomPercent</pre> | |||
This will set the variable "rnd" to an integer between 0 and 99, inclusive | |||
}} | |||
==Notes== | |||
*To generate a random number between min and max: | |||
<pre>set randVal to min + GetRandomPercent * (max-min) / 99</pre> | |||
==See Also== | |||