X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fmodules%2Fmod_particle%2Frandom.cpp;h=783a34c5c34d4f343350102effd24ee650ab9abd;hb=534d634ec3ace72b406bde4f847ac1eb506fe484;hp=c72c76343eed08cb0075528fa080a5e2d0afba55;hpb=14c4d99cbeedaba4c2f13bf8256458e326a8ecf3;p=synfig.git diff --git a/synfig-core/trunk/src/modules/mod_particle/random.cpp b/synfig-core/trunk/src/modules/mod_particle/random.cpp index c72c763..783a34c 100644 --- a/synfig-core/trunk/src/modules/mod_particle/random.cpp +++ b/synfig-core/trunk/src/modules/mod_particle/random.cpp @@ -57,6 +57,10 @@ Random::set_seed(int x) t_mask=rand()+rand()*RAND_MAX; } +// this picks one of the POOL_SIZE (256) preset values out of the pool +// and scales it to be in the range (-1, 1). is that what it was +// intended to do? the distribution is pretty terrible, too, with +// some elements being picked a hundred times more often than others float Random::operator()(const int salt,const int x,const int y,const int t)const {