Commit Graph

9 Commits

Author SHA1 Message Date
Andrii Doroshenko (Xrayez) 47899e67c5 Add ability to restore `RandomNumberGenerator` state
3.2 version of b5107715f1.

`get_seed()` still returns the previous state and not the initial seed,
because users may rely on this behavior for resetting the state in 3.2.
Documented this is going to be fixed in 4.0.

Co-authored-by: MidZik <matt.idzik1@gmail.com>
2021-01-08 15:02:02 +02:00
Andrii Doroshenko (Xrayez) 943db2ca34
Make `randbase` member protected in `RandomNumberGenerator`
Allows to extend `RandomNumberGenerator` via C++ modules.

(cherry picked from commit 1923f0d302)
2020-10-28 14:05:42 +01:00
Rémi Verschelde a7f49ac9a1 Update copyright statements to 2020
Happy new year to the wonderful Godot community!

We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.

Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
2020-01-01 11:16:22 +01:00
qarmin 3c154eb93b Remove unnecessary code and add some error explanations 2019-07-01 12:59:42 +02:00
Tomasz Chabora d89478975f Validate parameters of randi_range() 2019-06-12 19:46:07 +02:00
Chaosus 5f137925dc Added normally distributed generation function to RNG 2019-03-17 08:09:46 +03:00
Rémi Verschelde b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
Chaosus d376be2bf4 Added integer number generation function to RNG class 2018-12-06 14:49:52 +03:00
Chaosus f8151a9e50 Implement random number generator
Co-authored-by: Zirak <zirakertan@gmail.com>
2018-11-13 10:50:07 +03:00