doc: Override default value for RandomNumberGenerator.seed

It's non-deterministic so it's better to show a fixed value like 0 instead of
having it potentially change whenever `randomize()` is called.

Fixes #43317.
This commit is contained in:
Rémi Verschelde
2020-11-05 00:41:18 +01:00
parent 8e13b93bf7
commit 35e6070a35
2 changed files with 6 additions and 2 deletions
+2 -1
View File
@@ -74,9 +74,10 @@
</method>
</methods>
<members>
<member name="seed" type="int" setter="set_seed" getter="get_seed" default="-6398989897141750821">
<member name="seed" type="int" setter="set_seed" getter="get_seed" default="0">
The seed used by the random number generator. A given seed will give a reproducible sequence of pseudo-random numbers.
[b]Note:[/b] The RNG does not have an avalanche effect, and can output similar random streams given similar seeds. Consider using a hash function to improve your seed quality if they're sourced externally.
[b]Note:[/b] The default value of this property is pseudo-random, and changes when calling [method randomize]. The [code]0[/code] value documented here is a placeholder, and not the actual default seed.
</member>
</members>
<constants>