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>2012-02-19 09:11:24 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-02-19 09:11:24 +0400
commit02b28e9162784933f470c5381b290f2582706a51 (patch)
tree1e1ed7c5c79eb20a57435eebc5a5f359a6feb90f /source/blender/render
parent445003973434da55614e90fcee2f99f1765afd8f (diff)
replace MIN2 / MAX2 with minf / maxf to avoid calling functions multiple times.
Diffstat (limited to 'source/blender/render')
-rw-r--r--source/blender/render/intern/source/pixelshading.c2
-rw-r--r--source/blender/render/intern/source/shadeoutput.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/render/intern/source/pixelshading.c b/source/blender/render/intern/source/pixelshading.c
index 24683ec57f7..9746a6dbd86 100644
--- a/source/blender/render/intern/source/pixelshading.c
+++ b/source/blender/render/intern/source/pixelshading.c
@@ -161,7 +161,7 @@ static void render_lighting_halo(HaloRen *har, float col_r[3])
copy_v3_v3(lvrot, lv);
mul_m3_v3(lar->imat, lvrot);
- x= MAX2(fabs(lvrot[0]/lvrot[2]) , fabs(lvrot[1]/lvrot[2]));
+ x = maxf(fabsf(lvrot[0]/lvrot[2]), fabsf(lvrot[1]/lvrot[2]));
/* 1.0/(sqrt(1+x*x)) is equivalent to cos(atan(x)) */
inpr= 1.0/(sqrt(1.0f+x*x));
diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c
index 2f620bb96d4..78420aa6ca8 100644
--- a/source/blender/render/intern/source/shadeoutput.c
+++ b/source/blender/render/intern/source/shadeoutput.c
@@ -1204,7 +1204,7 @@ float lamp_get_visibility(LampRen *lar, const float co[3], float lv[3], float *d
copy_v3_v3(lvrot, lv);
mul_m3_v3(lar->imat, lvrot);
- x= MAX2(fabs(lvrot[0]/lvrot[2]) , fabs(lvrot[1]/lvrot[2]));
+ x = maxf(fabsf(lvrot[0]/lvrot[2]), fabsf(lvrot[1]/lvrot[2]));
/* 1.0f/(sqrt(1+x*x)) is equivalent to cos(atan(x)) */
inpr= 1.0f/(sqrt(1.0f+x*x));