summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-02-16 22:05:23 +0100
committerGitHub <noreply@github.com>2019-02-16 22:05:23 +0100
commit44d24e8b78e73448f586ef8e9138d3e15d2ab7e4 (patch)
tree16c74ef6ffe4afb66ce65d123ff4b4435dbca390 /doc/classes
parent1f9c54bd55a914c8126e4c9954ad648cdeddacb1 (diff)
parent3b6d05db3e100c53bf494a70550d548fd29d955b (diff)
Merge pull request #25952 from pbrunet/fix/rand
Fix typo for randd and randf
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/@GDScript.xml6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/classes/@GDScript.xml b/doc/classes/@GDScript.xml
index 072eec800f..b56e5bf8e7 100644
--- a/doc/classes/@GDScript.xml
+++ b/doc/classes/@GDScript.xml
@@ -809,7 +809,7 @@
<argument index="1" name="to" type="float">
</argument>
<description>
- Random range, any floating point value between [code]from[/code] and [code]to[/code].
+ Random range, any floating point value in the interval [[code]from[/code], [code]to[/code]].
[codeblock]
prints(rand_range(0, 1), rand_range(0, 1)) # prints 0.135591 0.405263
[/codeblock]
@@ -828,7 +828,7 @@
<return type="float">
</return>
<description>
- Returns a random floating point value between 0 and 1.
+ Returns a random floating point value on the interval [0, 1].
[codeblock]
randf() # returns 0.375671
[/codeblock]
@@ -838,7 +838,7 @@
<return type="int">
</return>
<description>
- Returns a random 32 bit integer. Use remainder to obtain a random value between 0 and N (where N is smaller than 2^32 -1).
+ Returns a random 32 bit integer. Use remainder to obtain a random value in the interval [0, N] (where N is smaller than 2^32 -1).
[codeblock]
randi() % 20 # returns random number between 0 and 19
randi() % 100 # returns random number between 0 and 99