Package org.terasology.utilities.random

Examples of org.terasology.utilities.random.FastRandom.nextFloat()


            pn.noise(posX, posY, posZ);
        }

        for (int i = 0; i < warmUp; i++) {
            float posX = sfr.nextFloat() * 1000f;
            float posY = sfr.nextFloat() * 1000f;
            float posZ = sfr.nextFloat() * 1000f;

            sn.noise(posX, posY, posZ);
        }
View Full Code Here


            pn.noise(posX, posY, posZ);
        }

        for (int i = 0; i < warmUp; i++) {
            float posX = sfr.nextFloat() * 1000f;
            float posY = sfr.nextFloat() * 1000f;
            float posZ = sfr.nextFloat() * 1000f;

            sn.noise(posX, posY, posZ);
        }

View Full Code Here

        }

        for (int i = 0; i < warmUp; i++) {
            float posX = sfr.nextFloat() * 1000f;
            float posY = sfr.nextFloat() * 1000f;
            float posZ = sfr.nextFloat() * 1000f;

            sn.noise(posX, posY, posZ);
        }

        long start = System.nanoTime();
View Full Code Here

        logger.info("Perlin Noise : " + (System.nanoTime() - start) / 1000000 + "ms.");

        start = System.nanoTime();

        for (int i = 0; i < count; i++) {
            float posX = sfr.nextFloat() * 1000f;
            float posY = sfr.nextFloat() * 1000f;
            float posZ = sfr.nextFloat() * 1000f;

            sn.noise(posX, posY, posZ);
        }
View Full Code Here

        start = System.nanoTime();

        for (int i = 0; i < count; i++) {
            float posX = sfr.nextFloat() * 1000f;
            float posY = sfr.nextFloat() * 1000f;
            float posZ = sfr.nextFloat() * 1000f;

            sn.noise(posX, posY, posZ);
        }

View Full Code Here

        start = System.nanoTime();

        for (int i = 0; i < count; i++) {
            float posX = sfr.nextFloat() * 1000f;
            float posY = sfr.nextFloat() * 1000f;
            float posZ = sfr.nextFloat() * 1000f;

            sn.noise(posX, posY, posZ);
        }

        logger.info("Simplex Noise : " + (System.nanoTime() - start) / 1000000 + "ms.");
View Full Code Here

    public void setup() {
        FastRandom rand = new FastRandom(0L);
        rawEntityData = Lists.newArrayList();
        for (int i = 0; i < 1000; ++i) {
            List<Component> entityData = Lists.newArrayList();
            if (rand.nextFloat() < 0.75f) {
                entityData.add(new LocationComponent());
            }
            if (rand.nextFloat() < 0.5f) {
                entityData.add(new MeshComponent());
            }
View Full Code Here

        for (int i = 0; i < 1000; ++i) {
            List<Component> entityData = Lists.newArrayList();
            if (rand.nextFloat() < 0.75f) {
                entityData.add(new LocationComponent());
            }
            if (rand.nextFloat() < 0.5f) {
                entityData.add(new MeshComponent());
            }
            if (rand.nextFloat() < 0.5f) {
                entityData.add(new InventoryComponent());
            }
View Full Code Here

                entityData.add(new LocationComponent());
            }
            if (rand.nextFloat() < 0.5f) {
                entityData.add(new MeshComponent());
            }
            if (rand.nextFloat() < 0.5f) {
                entityData.add(new InventoryComponent());
            }
            if (rand.nextFloat() < 0.25f) {
                entityData.add(new BlockComponent());
            }
View Full Code Here

                entityData.add(new MeshComponent());
            }
            if (rand.nextFloat() < 0.5f) {
                entityData.add(new InventoryComponent());
            }
            if (rand.nextFloat() < 0.25f) {
                entityData.add(new BlockComponent());
            }
            rawEntityData.add(entityData);
        }
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.