Class RandomNumberGenerator

java.lang.Object
preponderous.ponder.misc.RandomNumberGenerator

public class RandomNumberGenerator extends Object
Since:
January 7th, 2022
  • 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

      public Random getRandom()
      Returns:
      The inner Random class of the RNG.
    • setRandom

      public void setRandom(Random random)
      Parameters:
      random - The new random class of the RNG.
    • reinitializeRandom

      public void reinitializeRandom()