diff options
author | Campbell Barton <campbell@blender.org> | 2022-09-30 07:16:14 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-09-30 07:51:49 +0300 |
commit | 8bdd4b468554446cb1351785f0db751e2f84341f (patch) | |
tree | d81bda8a17f036de212b2982d7b13093f5b35a9e /source/blender/modifiers | |
parent | 1c1dc5f8440d918aca480904c53e31a528aef42f (diff) |
Cleanup: use function style casts for C++
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r-- | source/blender/modifiers/intern/MOD_wave.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/modifiers/intern/MOD_wave.cc b/source/blender/modifiers/intern/MOD_wave.cc index 44002b2d719..0fc2d76f87e 100644 --- a/source/blender/modifiers/intern/MOD_wave.cc +++ b/source/blender/modifiers/intern/MOD_wave.cc @@ -135,7 +135,7 @@ static void waveModifier_do(WaveModifierData *md, const MDeformVert *dvert; int defgrp_index; float ctime = DEG_get_ctime(ctx->depsgraph); - float minfac = (float)(1.0 / exp(wmd->width * wmd->narrow * wmd->width * wmd->narrow)); + float minfac = float(1.0 / exp(wmd->width * wmd->narrow * wmd->width * wmd->narrow)); float lifefac = wmd->height; float(*tex_co)[3] = nullptr; const int wmd_axis = wmd->flag & (MOD_WAVE_X | MOD_WAVE_Y); @@ -175,7 +175,7 @@ static void waveModifier_do(WaveModifierData *md, lifefac = 0.0; } else { - lifefac = (float)(wmd->height * (1.0f - sqrtf(lifefac / wmd->damp))); + lifefac = float(wmd->height * (1.0f - sqrtf(lifefac / wmd->damp))); } } } @@ -227,7 +227,7 @@ static void waveModifier_do(WaveModifierData *md, amplit -= (ctime - wmd->timeoffs) * wmd->speed; if (wmd->flag & MOD_WAVE_CYCL) { - amplit = (float)fmodf(amplit - wmd->width, 2.0f * wmd->width) + wmd->width; + amplit = float(fmodf(amplit - wmd->width, 2.0f * wmd->width)) + wmd->width; } if (falloff != 0.0f) { @@ -252,7 +252,7 @@ static void waveModifier_do(WaveModifierData *md, /* GAUSSIAN */ if ((falloff_fac != 0.0f) && (amplit > -wmd->width) && (amplit < wmd->width)) { amplit = amplit * wmd->narrow; - amplit = (float)(1.0f / expf(amplit * amplit) - minfac); + amplit = float(1.0f / expf(amplit * amplit) - minfac); /* Apply texture. */ if (tex_co) { |