Difference between revisions of "GetRandomPercent"

116 bytes added ,  15:02, 25 February 2011
no edit summary
imported>JOG
imported>JOG
Line 13: Line 13:


==Notes==
==Notes==
*To generate a random number between min and max:  
*To generate a random number between 1 and max:  


<pre>set randVal to min + GetRandomPercent * max / 100</pre>
<pre>set randVal to 1 + GetRandomPercent * max / 100</pre>
 
To generate a random number between min and max:
 
<pre>set randVal to min + GetRandomPercent * (max-min+1) / 100</pre>


==See Also==
==See Also==
Anonymous user