diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-02-14 13:36:46 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-02-14 13:42:09 +0300 |
commit | 1c34825b4f1b8dbc658c60120dacb2600936bdd9 (patch) | |
tree | e31be6189a78124c9ee3eedafe93582beab317eb /source/blender/blenkernel/intern/particle_child.c | |
parent | c09e4ae08a4d97beaf919e6434eca4956a47d401 (diff) |
Hair child: Use clamp function to clamp curve evaluation
Avoids redundant calls to the curve evaluation.
Diffstat (limited to 'source/blender/blenkernel/intern/particle_child.c')
-rw-r--r-- | source/blender/blenkernel/intern/particle_child.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/particle_child.c b/source/blender/blenkernel/intern/particle_child.c index bfcda89a635..667d51b3536 100644 --- a/source/blender/blenkernel/intern/particle_child.c +++ b/source/blender/blenkernel/intern/particle_child.c @@ -565,7 +565,7 @@ static float do_clump_level(float result[3], const float co[3], const float par_ float clump = 0.0f; if (clumpcurve) { - clump = pa_clump * (1.0f - CLAMPIS(curvemapping_evaluateF(clumpcurve, 0, time), 0.0f, 1.0f)); + clump = pa_clump * (1.0f - clamp_f(curvemapping_evaluateF(clumpcurve, 0, time), 0.0f, 1.0f)); interp_v3_v3v3(result, co, par_co, clump); } @@ -655,7 +655,7 @@ static void do_rough_curve(const float loc[3], float mat[4][4], float time, floa if (!roughcurve) return; - fac *= CLAMPIS(curvemapping_evaluateF(roughcurve, 0, time), 0.0f, 1.0f); + fac *= clamp_f(curvemapping_evaluateF(roughcurve, 0, time), 0.0f, 1.0f); copy_v3_v3(rco, loc); mul_v3_fl(rco, time); |