public class Rnd extends Object
| Constructor and Description |
|---|
Rnd() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
chance(double chance) |
static boolean |
chance(int chance) |
static float |
get() |
static int |
get(int n)
Gets a random number from 0(inclusive) to n(exclusive)
|
static int |
get(int[] list) |
static int |
get(int min,
int max)
Get a random number from min(inclusiv) to max(inclusiv)
|
static Object |
get(List<?> list) |
static <T> T |
get(T[] list) |
static float[] |
getFloats(int amount)
Returns a array of length amount with random floats.
|
static boolean |
nextBoolean() |
static byte |
nextByte() |
static char |
nextChar() |
static double |
nextDouble() |
static float |
nextFloat() |
static double |
nextGaussian() |
static int |
nextInt() |
static int |
nextInt(int n) |
static long |
nextLong() |
static short |
nextShort() |
static String |
nextString() |
public static float get()
public static float[] getFloats(int amount)
amount - - size of returned arraypublic static int get(int n)
n - The superior limit (exclusive)public static int get(int min,
int max)
min - max - public static boolean chance(int chance)
public static boolean chance(double chance)
public static <T> T get(T[] list)
public static int get(int[] list)
public static int nextInt(int n)
n - public static int nextInt()
public static short nextShort()
public static long nextLong()
public static float nextFloat()
public static byte nextByte()
public static double nextDouble()
public static double nextGaussian()
public static boolean nextBoolean()
public static char nextChar()
public static String nextString()
Copyright © 2014–2015. All rights reserved.