Difference between revisions of "GetRandomNumber"

From Catglobe Wiki
Jump to: navigation, search
Line 1: Line 1:
 
[[Category:General_Functions]]
 
[[Category:General_Functions]]

+
{{HelpFiles}}
  
 
====getRandomNumber====
 
====getRandomNumber====

Revision as of 09:38, 12 December 2011



getRandomNumber

Generates a random number.

The random number will be within the range specified(min value <= random number < max value), where 0 is the minimum value for a random number if only a maximum value is given as argument to the function.

Syntax

getRandomNumber(maximum_value);

getRandomNumber(minimum_value, maximum_value);

Arguments

minimum_value: Is an expression with the type of number

maximum_value: Is an expression with the type of number

Return type

number

Examples

{

print("A random number: ");

print(getRandomNumber(100, 200));

}

Availability

Version 4.8