Package preponderous.ponder.misc
Class RandomNumberGenerator
java.lang.Object
preponderous.ponder.misc.RandomNumberGenerator
- Since:
- January 7th, 2022
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
generateRandomDouble(int bound)
int
generateRandomInteger(int bound)
void
void
-
Constructor Details
-
RandomNumberGenerator
public RandomNumberGenerator()
-
-
Method Details
-
generateRandomInteger
public int generateRandomInteger(int bound)- Parameters:
bound
- The bound for the possible numbers.- Returns:
- A random integer up to the given bound.
-
generateRandomDouble
public double generateRandomDouble(int bound)- Parameters:
bound
- The bound for the possible numbers.- Returns:
- A random double up to the given bound.
-
getRandom
- Returns:
- The inner Random class of the RNG.
-
setRandom
- Parameters:
random
- The new random class of the RNG.
-
reinitializeRandom
public void reinitializeRandom()
-