Code example for Random

Methods: nextBooleannextFloat

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 boolean flip() { 
            return sRNG.nextBoolean();
        } 
 
        static float mag(float x, float y) {
            return (float) Math.sqrt(x*x+y*y);
        } 
 
Stop searching for code, let great code find you!  Add Codota to your java IDE