diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-09-05 09:43:01 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-09-05 09:43:01 +0400 |
commit | cc906e0e2a1de9b19c6cefa1167332f348bb9e0f (patch) | |
tree | e49d523182a77a482ff7b361a3810df77cdba10a /source/blender/modifiers/intern/MOD_weightvgmix.c | |
parent | e5209c205974b03f1090bf73414a82072a6a0d5b (diff) |
correct float -> double promotion warnings
Diffstat (limited to 'source/blender/modifiers/intern/MOD_weightvgmix.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_weightvgmix.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/modifiers/intern/MOD_weightvgmix.c b/source/blender/modifiers/intern/MOD_weightvgmix.c index a30afcb230f..7543b085b51 100644 --- a/source/blender/modifiers/intern/MOD_weightvgmix.c +++ b/source/blender/modifiers/intern/MOD_weightvgmix.c @@ -98,16 +98,16 @@ static float mix_weight(float weight, float weight2, char mix_mode) return (weight * weight2); else if (mix_mode == MOD_WVG_MIX_DIV) { /* Avoid dividing by zero (or really small values). */ - if (weight2 < 0.0 && weight2 > -MOD_WVG_ZEROFLOOR) + if (weight2 < 0.0f && weight2 > -MOD_WVG_ZEROFLOOR) weight2 = -MOD_WVG_ZEROFLOOR; - else if (weight2 >= 0.0 && weight2 < MOD_WVG_ZEROFLOOR) + else if (weight2 >= 0.0f && weight2 < MOD_WVG_ZEROFLOOR) weight2 = MOD_WVG_ZEROFLOOR; return (weight / weight2); } else if (mix_mode == MOD_WVG_MIX_DIF) return (weight < weight2 ? weight2 - weight : weight - weight2); else if (mix_mode == MOD_WVG_MIX_AVG) - return (weight + weight2) / 2.0; + return (weight + weight2) * 0.5f; else return weight2; } |