<- PRPL reference <- Everything Else 2

RANDINT

ArgumentsResultNotation
Number 1, Number 2 Int [ i1 i2 - i3 ]

Description

Returns a random integer from a range of two numbers exclusive of the max number.

Examples

	int max = GetIntFromStack(); 
	int min = GetIntFromStack(); 
	stack.Push(new Data(min+amt)); 
 
        0 10 RandInt ->Int  //Picks a random number between 0 and 10, Inclusive min, Exclusive max
        // Inclusive min Exclusive max means that 0 10 RandInt CAN [inclusive] pick 0 [min] but cannot [exclusive] pick 10 [max]  
        // A workaround for between 0 and 10 both inclusive is to do 0 11 RandInt, so 11 will exclude but 10 will include [basically, 0 10 1 add RandInt]
        <-Int trace