diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-10-27 15:18:54 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-10-27 15:18:54 +0400 |
commit | 9fc95bd7ee2aed9d4de7c3c05dfef6597b83a332 (patch) | |
tree | a93569a6068e176cd68d859e880a3124da37d7dd /source/blender/blenkernel/intern | |
parent | ec67334e25b92c60f97978ef1bf754b4ba55127e (diff) |
use min/max inline functions where MIN2/MAX2 were doing type conversion.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/collision.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/particle.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/scene.c | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index 7a4b3edde47..8da0538a08d 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -312,8 +312,8 @@ static int cloth_collision_response_static ( ClothModifierData *clmd, CollisionM /* stay on the safe side and clamp repulse */ if ( impulse > ALMOST_ZERO ) - repulse = MIN2 ( repulse, 5.0*impulse ); - repulse = MAX2 ( impulse, repulse ); + repulse = min_ff( repulse, 5.0*impulse ); + repulse = max_ff(impulse, repulse); impulse = repulse / ( 1.0f + w1*w1 + w2*w2 + w3*w3 ); /* original 2.0 / 0.25 */ VECADDMUL ( i1, collpair->normal, impulse ); diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index 50927d705e2..9e37cc95b8c 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -899,7 +899,7 @@ int psys_render_simplify_distribution(ParticleThreadContext *ctx, int tot) elem->scalemax = sqrt(elem->scalemax); /* clamp scaling */ - scaleclamp = MIN2(elem->totchild, 10.0f); + scaleclamp = (float)min_ii(elem->totchild, 10); elem->scalemin = MIN2(scaleclamp, elem->scalemin); elem->scalemax = MIN2(scaleclamp, elem->scalemax); diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index ddf8b330ba1..fbe327aa525 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -1194,7 +1194,7 @@ int BKE_scene_remove_render_layer(Main *bmain, Scene *scene, SceneRenderLayer *s int get_render_subsurf_level(RenderData *r, int lvl) { if (r->mode & R_SIMPLIFY) - return MIN2(r->simplify_subsurf, lvl); + return min_ii(r->simplify_subsurf, lvl); else return lvl; } @@ -1210,7 +1210,7 @@ int get_render_child_particle_number(RenderData *r, int num) int get_render_shadow_samples(RenderData *r, int samples) { if ((r->mode & R_SIMPLIFY) && samples > 0) - return MIN2(r->simplify_shadowsamples, samples); + return min_ii(r->simplify_shadowsamples, samples); else return samples; } |