diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-11-05 00:41:18 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-11-05 00:41:24 +0100 |
commit | 35e6070a353044a82f5f33c7ca52e6f315320a29 (patch) | |
tree | 8aac05454a3b68539b3fc908824191daa06e18de /doc/classes | |
parent | 8e13b93bf78e4440e2012cec4940b8e3318daac1 (diff) |
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.
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/RandomNumberGenerator.xml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/classes/RandomNumberGenerator.xml b/doc/classes/RandomNumberGenerator.xml index d4f9517dd1..dcb75dc275 100644 --- a/doc/classes/RandomNumberGenerator.xml +++ b/doc/classes/RandomNumberGenerator.xml @@ -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> |