List of utility methods to do Random Boolean
boolean | generateRandomBoolean() generate Random Boolean return Math.random() >= 0.5;
|
boolean | getBoolean() Gets a random boolean. return RANDOM.nextInt(1) == 1;
|
boolean | getBoolean() get Boolean return getIntegerMoreThanZeroLessThan(3) == 1;
|
boolean | getBoolean() get Boolean if (random == null) init(); return random.nextBoolean(); |
boolean | getBoolean() Returns a pseudorandom, uniformly distributed boolean. return getBoolean(rand);
|
boolean | getBoolean(double probability) get Boolean return getDouble() < probability;
|
boolean | getBooleanWithProbability(int probabilityOfTrue) Gets a random boolean with a probability of being true. if (probabilityOfTrue <= 0) { return false; else { return new Random().nextInt(100) + 1 <= probabilityOfTrue; |
boolean | randBool(float chance) rand Bool float v = rand.nextFloat(); return chance > v; |
boolean | randomBoolean() random Boolean return Math.abs(Math.random() * 1000) % 57 != 0;
|
boolean | randomBoolean() random Boolean return Math.random() < 0.5d;
|