Return GetRandomEngine not by const, so we can actually use it
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-04-22 22:50:36 +02:00
parent 1b623c2b76
commit 535b68bb8c
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ namespace Arbutils {
explicit inline constexpr BaseRandom(uint_fast32_t seed) noexcept explicit inline constexpr BaseRandom(uint_fast32_t seed) noexcept
: _seed(seed), _rng(seed), _distribution(0.0, 1.0){}; : _seed(seed), _rng(seed), _distribution(0.0, 1.0){};
inline const RandomT& GetRandomEngine() const noexcept { return _rng; } inline RandomT& GetRandomEngine() const noexcept { return _rng; }
/// Gets a random float between 0.0 and 1.0. /// Gets a random float between 0.0 and 1.0.
[[nodiscard]] inline constexpr float GetFloat() noexcept { return static_cast<float>(GetDouble()); } [[nodiscard]] inline constexpr float GetFloat() noexcept { return static_cast<float>(GetDouble()); }