aboutsummaryrefslogtreecommitdiff
path: root/doc/base/classes.xml
diff options
context:
space:
mode:
authorRémi Verschelde2017-01-16 20:06:54 +0100
committerGitHub2017-01-16 20:06:54 +0100
commitbf05dab74f5c0fc19663dce05b462be2aba581a5 (patch)
tree837c11d04a76437e69d43744487cedf1bb5ec1f0 /doc/base/classes.xml
parent0a9aee6b1d20f29e0e7a3bc8990f807144b62f74 (diff)
parent4c9004671af455a03acb4e2750b12d62b2b3c917 (diff)
downloadgodot-bf05dab74f5c0fc19663dce05b462be2aba581a5.tar.gz
godot-bf05dab74f5c0fc19663dce05b462be2aba581a5.tar.zst
godot-bf05dab74f5c0fc19663dce05b462be2aba581a5.zip
Merge pull request #7532 from tagcup/pcg_prng
Replace the existing PRNG (Xorshift31) with (minimal) PCG-32.
Diffstat (limited to 'doc/base/classes.xml')
-rw-r--r--doc/base/classes.xml10
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/base/classes.xml b/doc/base/classes.xml
index 0088f576f..0b8c5cc11 100644
--- a/doc/base/classes.xml
+++ b/doc/base/classes.xml
@@ -463,7 +463,7 @@
<argument index="1" name="to" type="float">
</argument>
<description>
- Random range, any floating point value between 'from' and 'to'
+ Random range, any floating point value between 'from' and 'to'.
</description>
</method>
<method name="rand_seed">
@@ -472,28 +472,28 @@
<argument index="0" name="seed" type="int">
</argument>
<description>
- Random from seed, pass a seed and an array with both number and new seed is returned.
+ Random from seed: pass a seed, and an array with both number and new seed is returned. "Seed" here refers to the internal state of the pseudo random number generator. The internal state of the current implementation is 64 bits.
</description>
</method>
<method name="randf">
<return type="float">
</return>
<description>
- Random value (0 to 1 float).
+ Return a random floating point value between 0 and 1.
</description>
</method>
<method name="randi">
<return type="int">
</return>
<description>
- Random 32 bits value (integer). To obtain a value from 0 to N, you can use remainder, like (for random from 0 to 19): randi() % 20.
+ Return a random 32 bits integer value. To obtain a random value between 0 to N (where N is smaller than 2^32 - 1), you can use remainder. For example, to get a random integer between 0 and 19 inclusive, you can use randi() % 20.
</description>
</method>
<method name="randomize">
<return type="Nil">
</return>
<description>
- Reset the seed of the random number generator with a new, different one.
+ Randomize the seed (or the internal state) of the random number generator. Current implementation reseeds using a number based on time.
</description>
</method>
<method name="range">