diff options
Diffstat (limited to 'source/blender/blenlib/BLI_rand.hh')
-rw-r--r-- | source/blender/blenlib/BLI_rand.hh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenlib/BLI_rand.hh b/source/blender/blenlib/BLI_rand.hh index 2c4484bd63f..e4f35bef217 100644 --- a/source/blender/blenlib/BLI_rand.hh +++ b/source/blender/blenlib/BLI_rand.hh @@ -29,7 +29,7 @@ class RandomNumberGenerator { void seed(uint32_t seed) { constexpr uint64_t lowseed = 0x330E; - x_ = (static_cast<uint64_t>(seed) << 16) | lowseed; + x_ = (uint64_t(seed) << 16) | lowseed; } /** @@ -40,13 +40,13 @@ class RandomNumberGenerator { uint32_t get_uint32() { this->step(); - return static_cast<uint32_t>(x_ >> 17); + return uint32_t(x_ >> 17); } int32_t get_int32() { this->step(); - return static_cast<int32_t>(x_ >> 17); + return int32_t(x_ >> 17); } /** @@ -63,7 +63,7 @@ class RandomNumberGenerator { */ double get_double() { - return (double)this->get_int32() / 0x80000000; + return double(this->get_int32()) / 0x80000000; } /** |