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>2011-09-17 13:43:51 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-09-17 13:43:51 +0400
commitd4898f9c40dd008b14eab053864cd2b035652827 (patch)
tree59065a423ca156385153195372e66c25b9e28700 /source/blender/render
parent18d59e2645ed486e2530160da50abd87c652ed7a (diff)
use macros RAD2DEG & DEG2RAD rather then multiplying by 180.0/M_PI or M_PI/180.0
Diffstat (limited to 'source/blender/render')
-rw-r--r--source/blender/render/intern/source/convertblender.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c
index 934894f63b6..ba7af235acc 100644
--- a/source/blender/render/intern/source/convertblender.c
+++ b/source/blender/render/intern/source/convertblender.c
@@ -822,7 +822,7 @@ static void autosmooth(Render *UNUSED(re), ObjectRen *obr, float mat[][4], int d
if(obr->totvert==0) return;
asverts= MEM_callocN(sizeof(ASvert)*obr->totvert, "all smooth verts");
- thresh= cosf((float)M_PI*(0.5f+(float)degr)/180.0f );
+ thresh= cosf(DEG2RADF((0.5f + (float)degr)));
/* step zero: give faces normals of original mesh, if this is provided */
@@ -1717,7 +1717,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
if(part->draw & PART_DRAW_REN_ADAPT) {
sd.adapt = 1;
sd.adapt_pix = (float)part->adapt_pix;
- sd.adapt_angle = cos((float)part->adapt_angle * (float)(M_PI / 180.0));
+ sd.adapt_angle = cosf(DEG2RADF((float)part->adapt_angle));
}
if(re->r.renderer==R_INTERN && part->draw&PART_DRAW_REN_STRAND) {
@@ -1728,7 +1728,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
strandbuf->winx= re->winx;
strandbuf->winy= re->winy;
strandbuf->maxdepth= 2;
- strandbuf->adaptcos= cos((float)part->adapt_angle*(float)(M_PI/180.0));
+ strandbuf->adaptcos= cosf(DEG2RADF((float)part->adapt_angle));
strandbuf->overrideuv= sd.override_uv;
strandbuf->minwidth= ma->strand_min;