User Tools

Site Tools


syntax:functions:random

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
syntax:functions:random [2021/08/11 15:30] – [Generating random numbers within a given range] craigtsyntax:functions:random [2021/08/11 15:31] – [Examples] craigt
Line 38: Line 38:
 =====Examples===== =====Examples=====
 Extra spaces added for clarity. Extra spaces added for clarity.
-  random() 0.37130572949209748204+  random() //Returns 0.37130572949209748204 
   ( random() * 10 ) +2   //Random number between 2 and 12, unrounded.   ( random() * 10 ) +2   //Random number between 2 and 12, unrounded.
-  roundxl( ( random() * 20 ) +20 , 0 )  //Random number between 20 and 40, rounded to integer.+ 
 +  roundxl( ( random() * 20 ) +20 , 0 )  //Random number between 20 and 40, rounded to an integer.
  
  
syntax/functions/random.txt · Last modified: 2021/10/15 14:56 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki