X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftags%2Fstable%2Fsrc%2Fmodules%2Fmod_particle%2Frandom.cpp;h=ebdff92474e481d874f4638ee40e9f282790ce6c;hb=20067bb96af6946754e7ecb7b40673b818f6e5c2;hp=7e93d9932f49e5a843b396953ee30b658eec24fc;hpb=684cf1db661a9a5cbc142238cf05d6d2f7aa3f89;p=synfig.git diff --git a/synfig-core/tags/stable/src/modules/mod_particle/random.cpp b/synfig-core/tags/stable/src/modules/mod_particle/random.cpp index 7e93d99..ebdff92 100644 --- a/synfig-core/tags/stable/src/modules/mod_particle/random.cpp +++ b/synfig-core/tags/stable/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;