diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-07-02 18:32:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-02 18:32:03 +0200 |
commit | ee115d7b2d5385a80710c0f0a16009640193ff93 (patch) | |
tree | efe78df29a14fab58dd664e219c038c9eac809b2 /doc/classes/@GlobalScope.xml | |
parent | 710effdaad907cfa615a5a7d0439b67c16f1e6a6 (diff) | |
parent | 7d4c20f9db656440c2ff6bbdba8d863a20827ab7 (diff) |
Merge pull request #50081 from Calinou/doc-randomnumbergenerator
Improve and clarify documentation for RandomNumberGenerator
Diffstat (limited to 'doc/classes/@GlobalScope.xml')
-rw-r--r-- | doc/classes/@GlobalScope.xml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index daabc2c83b..66511f5845 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -778,7 +778,7 @@ <return type="float"> </return> <description> - Returns a random floating point value on the interval [code][0, 1][/code]. + Returns a random floating point value between [code]0.0[/code] and [code]1.0[/code] (inclusive). [codeblock] randf() # Returns e.g. 0.375671 [/codeblock] @@ -792,7 +792,7 @@ <argument index="1" name="to" type="float"> </argument> <description> - Random range, any floating point value between [code]from[/code] and [code]to[/code]. + Returns a random floating point value on the interval between [code]from[/code] and [code]to[/code] (inclusive). [codeblock] prints(randf_range(-10, 10), randf_range(-10, 10)) # Prints e.g. -3.844535 7.45315 [/codeblock] @@ -819,7 +819,7 @@ <argument index="1" name="to" type="int"> </argument> <description> - Random range, any 32-bit integer value between [code]from[/code] and [code]to[/code] (inclusive). If [code]to[/code] is lesser than [code]from[/code] they are swapped. + Returns a random signed 32-bit integer between [code]from[/code] and [code]to[/code] (inclusive). If [code]to[/code] is lesser than [code]from[/code], they are swapped. [codeblock] print(randi_range(0, 1)) # Prints 0 or 1 print(randi_range(-10, 1000)) # Prints any number from -10 to 1000 |