Examples of Randoms


Examples of tripleplay.util.Randoms

{
    @Test
    public void testSparseApply () {
        int maxParts = 4096;
        ParticleBuffer buffer = new ParticleBuffer(maxParts);
        Randoms rando = Randoms.with(new Random());
        final Set<Integer> lives = new HashSet<Integer>();
        for (int ii = 0; ii < 100; ii++) {
            int idx = rando.getInt(maxParts);
            lives.add(idx);
            buffer.setAlive(idx, true);
        }

        final int[] applied = new int[] { 0 };
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.