Difference between revisions of "Osiris/API/Random"
From Divinity Engine Wiki
(Created page with "===== Full Definition(s) ===== * query '''Random'''('''''[in]'''(INTEGER)'''''_Modulo''',''''' [out]'''(INTEGER)'''''_Random''') ===== Description ===== Returns a random integ...") |
|||
Line 3: | Line 3: | ||
===== Description ===== | ===== Description ===== | ||
Returns a random integer value between 0 and ('''_Modulo''' - 1). | Returns a random integer value between 0 and ('''_Modulo''' - 1). | ||
+ | For a negative '''_Modulo''', the result will be between '''_Modulo''' and 0. | ||
===== Return Values ===== | ===== Return Values ===== | ||
* '''Success/Failure''': Never fails. | * '''Success/Failure''': Never fails. | ||
* '''_Random''': A random number. | * '''_Random''': A random number. | ||
===== Notes ===== | ===== Notes ===== | ||
− | + | - | |
===== See Also ===== | ===== See Also ===== | ||
- | - | ||
[[Category:Osiris Queries]] | [[Category:Osiris Queries]] |
Revision as of 14:09, 14 November 2017
Full Definition(s)
- query Random([in](INTEGER)_Modulo, [out](INTEGER)_Random)
Description
Returns a random integer value between 0 and (_Modulo - 1). For a negative _Modulo, the result will be between _Modulo and 0.
Return Values
- Success/Failure: Never fails.
- _Random: A random number.
Notes
-
See Also
-