summaryrefslogtreecommitdiff
path: root/doc/classes/RandomNumberGenerator.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/RandomNumberGenerator.xml')
-rw-r--r--doc/classes/RandomNumberGenerator.xml9
1 files changed, 4 insertions, 5 deletions
diff --git a/doc/classes/RandomNumberGenerator.xml b/doc/classes/RandomNumberGenerator.xml
index 726f9e91d8..a6254788ce 100644
--- a/doc/classes/RandomNumberGenerator.xml
+++ b/doc/classes/RandomNumberGenerator.xml
@@ -10,10 +10,9 @@
[codeblock]
var rng = RandomNumberGenerator.new()
func _ready():
- rng.randomize()
var my_random_number = rng.randf_range(-10.0, 10.0)
[/codeblock]
- [b]Note:[/b] The default values of [member seed] and [member state] properties are pseudo-random, and changes when calling [method randomize]. The [code]0[/code] value documented here is a placeholder, and not the actual default seed.
+ [b]Note:[/b] The default values of [member seed] and [member state] properties are pseudo-random, and change when calling [method randomize]. The [code]0[/code] value documented here is a placeholder, and not the actual default seed.
</description>
<tutorials>
<link title="Random number generation">$DOCS_URL/tutorials/math/random_number_generation.html</link>
@@ -30,7 +29,7 @@
<param index="0" name="from" type="float" />
<param index="1" name="to" type="float" />
<description>
- Returns a pseudo-random float between [code]from[/code] and [code]to[/code] (inclusive).
+ Returns a pseudo-random float between [param from] and [param to] (inclusive).
</description>
</method>
<method name="randfn">
@@ -38,7 +37,7 @@
<param index="0" name="mean" type="float" default="0.0" />
<param index="1" name="deviation" type="float" default="1.0" />
<description>
- Returns a [url=https://en.wikipedia.org/wiki/Normal_distribution]normally-distributed[/url] pseudo-random number, using Box-Muller transform with the specified [code]mean[/code] and a standard [code]deviation[/code]. This is also called Gaussian distribution.
+ Returns a [url=https://en.wikipedia.org/wiki/Normal_distribution]normally-distributed[/url] pseudo-random number, using Box-Muller transform with the specified [param mean] and a standard [param deviation]. This is also called Gaussian distribution.
</description>
</method>
<method name="randi">
@@ -52,7 +51,7 @@
<param index="0" name="from" type="int" />
<param index="1" name="to" type="int" />
<description>
- Returns a pseudo-random 32-bit signed integer between [code]from[/code] and [code]to[/code] (inclusive).
+ Returns a pseudo-random 32-bit signed integer between [param from] and [param to] (inclusive).
</description>
</method>
<method name="randomize">