Back to project page Coloring-book.
The source code is released under:
Apache License
If you think the Android project Coloring-book listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.plattysoft.leonids.initializers; //from ww w. j av a 2 s . c om import java.util.Random; import com.plattysoft.leonids.Particle; public class ScaleInitializer implements ParticleInitializer { private float mMaxScale; private float mMinScale; public ScaleInitializer(float minScale, float maxScale) { mMinScale = minScale; mMaxScale = maxScale; } @Override public void initParticle(Particle p, Random r) { float scale = r.nextFloat()*(mMaxScale-mMinScale) + mMinScale; p.mScale = scale; } }