Happy new year to the wonderful Godot community!
2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.
We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)
Here's to a great year 2021 for all Godot users 🎆
- added `state` as a property to restore internal state of RNG;
- `get_seed()` returns last seed used to initialize the state rather than the current state.
Co-authored-by: MidZik <matt.idzik1@gmail.com>
Add __NetBSD__ to `platform_config.h` so that it can find `alloca`
and use the proper `pthread_setname_np` format.
Rename RANDOM_MAX to avoid conflict with NetBSD stdlib.
Fixes#42145.
We now require a compiler with C++17 support, so we don't need to
check for features added to GCC 5 or Clang 3.2.
Clang builtin availability checks were unused anyway as Clang defines
`__GNUC__` as it's also a GNU C implementation.
Fixes#36986.
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.
When generating single precision floats, Godot casts a uint32_t to float,
causing uniformity loss.
This new randf, inspired by T. R. Campbell's random_real, samples the output
of rand as the fraction part of an infinite binary number, with some tricks
to reduce ops and branching. This method provides "good enough" uniformity at
decent speed, for floats greater than 2^-64. Smaller numbers are floored to 0.