Code example for Random

Methods: nextBoolean, nextFloat, nextInt

0
        static float lerp(float a, float b, float f) {
            return (b-a)*f + a;
        } 
 
        static float randfrange(float a, float b) {
            return lerp(a, b, sRNG.nextFloat());
        } 
 
        static int randsign() { 
            return sRNG.nextBoolean() ? 1 : -1;
        } 
 
        static <E> E pick(E[] array) {
            if (array.length == 0) return null;
            return array[sRNG.nextInt(array.length)];
        } 
 
        public class FlyingIcon extends ImageView {
            public static final float VMAX = 1000.0f;
            public static final float VMIN = 100.0f;
            public static final float ANGULAR_VMAX = 45f;