Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-03-28 07:53:37 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-03-28 07:53:37 +0400
commit7199e2288f3df27ee2d21593da64ef4597fb86fd (patch)
tree33e69c15bb612736079510dd9fbcc055c6f06e51 /source/blender/modifiers/intern
parente6e74381819666141a5dd02d670ef06e64018dc3 (diff)
Code cleanup: use sqrtf when input and output are float
Diffstat (limited to 'source/blender/modifiers/intern')
-rw-r--r--source/blender/modifiers/intern/MOD_warp.c4
-rw-r--r--source/blender/modifiers/intern/MOD_weightvg_util.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/modifiers/intern/MOD_warp.c b/source/blender/modifiers/intern/MOD_warp.c
index 93be31bcad7..b9c89f404bb 100644
--- a/source/blender/modifiers/intern/MOD_warp.c
+++ b/source/blender/modifiers/intern/MOD_warp.c
@@ -253,7 +253,7 @@ static void warpModifier_do(WarpModifierData *wmd, Object *ob,
fac = 3.0f * fac * fac - 2.0f * fac * fac * fac;
break;
case eWarp_Falloff_Root:
- fac = (float)sqrt(fac);
+ fac = sqrtf(fac);
break;
case eWarp_Falloff_Linear:
/* pass */
@@ -262,7 +262,7 @@ static void warpModifier_do(WarpModifierData *wmd, Object *ob,
fac = 1.0f;
break;
case eWarp_Falloff_Sphere:
- fac = (float)sqrt(2 * fac - fac * fac);
+ fac = sqrtf(2 * fac - fac * fac);
break;
}
diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.c b/source/blender/modifiers/intern/MOD_weightvg_util.c
index 348b0361464..12ecae8ad4f 100644
--- a/source/blender/modifiers/intern/MOD_weightvg_util.c
+++ b/source/blender/modifiers/intern/MOD_weightvg_util.c
@@ -94,10 +94,10 @@ void weightvg_do_map(int num, float *new_w, short falloff_type, CurveMapping *cm
fac = 3.0f * fac * fac - 2.0f * fac * fac * fac;
break;
case MOD_WVG_MAPPING_ROOT:
- fac = (float)sqrt(fac);
+ fac = sqrtf(fac);
break;
case MOD_WVG_MAPPING_SPHERE:
- fac = (float)sqrt(2 * fac - fac * fac);
+ fac = sqrtf(2 * fac - fac * fac);
break;
case MOD_WVG_MAPPING_RANDOM:
fac = BLI_rng_get_float(rng) * fac;