Returns a random number between 0.0 and 1.0.
1 math.random
<math.random />
Returns | |
---|---|
Type | Description |
double | Returns the random number generated by the function. |
Example
Copy
<xsql-script name='random_sample1'> <body> <println><math.random/></println> </body> </xsql-script>
0.5137129555078781
It is returned a random number with 16 decimals.
Example
Copy
<xsql-script name='random_sample2'> <body> <println> <math.round> <mul><math.random/>10000</mul> <number>0</number> </math.round> </println> </body> </xsql-script>
8345
It is returned a integer random number between 0 and 10000.