User Tools

Site Tools


xrpl:randint

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

xrpl:randint [2019/03/04 00:55] – created Karsten75xrpl:randint [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1
Line 1: Line 1:
- 
-=====  RANDINT  ===== 
- 
-^Arguments^Result^Notation^ 
-| 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 === 
-<code> 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 
-</code> 
  
xrpl/randint.1551660909.txt.gz · Last modified: 2025/02/14 14:56 (external edit)