diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-12-01 06:11:12 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-12-01 06:11:12 +0400 |
commit | ac38f2584f1c08d5f9db9f4fbd71f8845885c6d1 (patch) | |
tree | 4557d7b1549a6d62fe8a0043a0f0bf9dd0ef5c62 /source/blender/blenkernel/intern/implicit.c | |
parent | dbd7025fae31f18037be39e9dcd8ed84e1ac41cd (diff) |
Code Cleanup: replace ABS() with fabsf() when used with float expressions.
Diffstat (limited to 'source/blender/blenkernel/intern/implicit.c')
-rw-r--r-- | source/blender/blenkernel/intern/implicit.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index c8e18bc3dee..fce6ed9d6c6 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -1265,7 +1265,7 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, k = clmd->sim_parms->structural; - scaling = k + s->stiffness * ABS(clmd->sim_parms->max_struct-k); + scaling = k + s->stiffness * fabsf(clmd->sim_parms->max_struct - k); k = scaling / (clmd->sim_parms->avg_spring_len + FLT_EPSILON); @@ -1305,7 +1305,7 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, k = clmd->sim_parms->goalspring; - scaling = k + s->stiffness * ABS(clmd->sim_parms->max_struct-k); + scaling = k + s->stiffness * fabsf(clmd->sim_parms->max_struct - k); k = verts [s->ij].goal * scaling / (clmd->sim_parms->avg_spring_len + FLT_EPSILON); @@ -1324,7 +1324,7 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, k = clmd->sim_parms->bending; - scaling = k + s->stiffness * ABS(clmd->sim_parms->max_bend-k); + scaling = k + s->stiffness * fabsf(clmd->sim_parms->max_bend - k); cb = k = scaling / (20.0f * (clmd->sim_parms->avg_spring_len + FLT_EPSILON)); mul_fvector_S(bending_force, dir, fbstar(length, L, k, cb)); |