Examples of pickRandom()


Examples of toxi.util.datatypes.BiasedFloatRange.pickRandom()

     * @return Vec2D
     */
    public Vec2D getRandomPoint() {
        float theta = MathUtils.random(MathUtils.TWO_PI);
        BiasedFloatRange rnd = new BiasedFloatRange(0f, 1f, 1f, MathUtils.SQRT2);
        return Vec2D.fromTheta(theta).scaleSelf(radius.scale(rnd.pickRandom()))
                .addSelf(this);
    }

    /**
     * Sets the radii of the ellipse to the new values.
View Full Code Here

Examples of toxi.util.datatypes.BiasedFloatRange.pickRandom()

        System.out.println("");
    }

    public void testCopy() {
        BiasedFloatRange r = new BiasedFloatRange();
        r.pickRandom();
        BiasedFloatRange c = r.copy();
        assertEquals(r.currValue, c.currValue);
        assertEquals(r.getBias(), c.getBias());
        assertEquals(r.getStandardDeviation(), c.getStandardDeviation());
        BiasedIntegerRange ri = new BiasedIntegerRange();
View Full Code Here

Examples of toxi.util.datatypes.BiasedIntegerRange.pickRandom()

        BiasedFloatRange c = r.copy();
        assertEquals(r.currValue, c.currValue);
        assertEquals(r.getBias(), c.getBias());
        assertEquals(r.getStandardDeviation(), c.getStandardDeviation());
        BiasedIntegerRange ri = new BiasedIntegerRange();
        ri.pickRandom();
        BiasedIntegerRange ci = ri.copy();
        assertEquals(ri.currValue, ci.currValue);
        assertEquals(ri.getBias(), ci.getBias());
        assertEquals(ri.getStandardDeviation(), ci.getStandardDeviation());
    }
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.