diff options
author | Campbell Barton <campbell@blender.org> | 2022-09-25 11:30:50 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-09-25 11:31:10 +0300 |
commit | c7b247a118e302a3afc6473797e53b6af28b69e2 (patch) | |
tree | d11149a165bfd8f3b3b791f24547499f041b133b /source/blender/blenlib/intern/noise.cc | |
parent | 891949cbb47143420f4324cb60efc05ef5d70b39 (diff) |
Cleanup: replace static_casts with functional casts for numeric types
Diffstat (limited to 'source/blender/blenlib/intern/noise.cc')
-rw-r--r-- | source/blender/blenlib/intern/noise.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/noise.cc b/source/blender/blenlib/intern/noise.cc index 8a073239b31..19c4b92a315 100644 --- a/source/blender/blenlib/intern/noise.cc +++ b/source/blender/blenlib/intern/noise.cc @@ -150,7 +150,7 @@ uint32_t hash_float(float4 k) BLI_INLINE float uint_to_float_01(uint32_t k) { - return static_cast<float>(k) / static_cast<float>(0xFFFFFFFFu); + return float(k) / float(0xFFFFFFFFu); } float hash_to_float(uint32_t kx) @@ -536,7 +536,7 @@ template<typename T> float perlin_fractal_template(T position, float octaves, fl float maxamp = 0.0f; float sum = 0.0f; octaves = CLAMPIS(octaves, 0.0f, 15.0f); - int n = static_cast<int>(octaves); + int n = int(octaves); for (int i = 0; i <= n; i++) { float t = perlin(fscale * position); sum += t * amp; |