From: dooglus Date: Wed, 10 Oct 2007 03:20:24 +0000 (+0000) Subject: Small changes to make these files more similar to the ones in modules/mod_noise. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=071f1e902223053f30ef4c050a2fbb5ffc87f430;p=synfig.git Small changes to make these files more similar to the ones in modules/mod_noise. git-svn-id: http://svn.voria.com/code@879 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-core/trunk/src/modules/mod_particle/random.cpp b/synfig-core/trunk/src/modules/mod_particle/random.cpp index 7e93d99..ebdff92 100644 --- a/synfig-core/trunk/src/modules/mod_particle/random.cpp +++ b/synfig-core/trunk/src/modules/mod_particle/random.cpp @@ -38,6 +38,8 @@ /* === M A C R O S ========================================================= */ +#define PI (3.1415927) + /* === G L O B A L S ======================================================= */ /* === P R O C E D U R E S ================================================= */ @@ -224,8 +226,8 @@ Random::operator()(SmoothType smooth,int subseed,float xf,float yf,float tf)cons int y((int)floor(yf)); float a=xf-x; float b=yf-y; - a=(1.0f-cos(a*3.1415927))*0.5f; - b=(1.0f-cos(b*3.1415927))*0.5f; + a=(1.0f-cos(a*PI))*0.5f; + b=(1.0f-cos(b*PI))*0.5f; float c=1.0-a; float d=1.0-b; int x2=x+1,y2=y+1; @@ -241,12 +243,12 @@ Random::operator()(SmoothType smooth,int subseed,float xf,float yf,float tf)cons float b=yf-y; float c=tf-t; - a=(1.0f-cos(a*3.1415927))*0.5f; - b=(1.0f-cos(b*3.1415927))*0.5f; + a=(1.0f-cos(a*PI))*0.5f; + b=(1.0f-cos(b*PI))*0.5f; // We don't perform this on the time axis, otherwise we won't // get smooth motion - //c=(1.0f-cos(c*3.1415927))*0.5f; + //c=(1.0f-cos(c*PI))*0.5f; float d=1.0-a; float e=1.0-b; diff --git a/synfig-core/trunk/src/modules/mod_particle/random.h b/synfig-core/trunk/src/modules/mod_particle/random.h index 6459332..943a1cd 100644 --- a/synfig-core/trunk/src/modules/mod_particle/random.h +++ b/synfig-core/trunk/src/modules/mod_particle/random.h @@ -28,7 +28,6 @@ /* === H E A D E R S ======================================================= */ - /* === M A C R O S ========================================================= */ /* === T Y P E D E F S ===================================================== */