Class IntRandomFunction

Class Documentation

class IntRandomFunction

Class for generating random integers within a specified range.

Public Functions

explicit IntRandomFunction(int seed = 0)

Constructor that initializes the random seed.

Parameters:

seed – The seed value for the random number generator.

explicit IntRandomFunction(int lowBound, int hiBound)

Constructor that sets the range for random integers.

Parameters:
  • lowBound – The lower bound of the range.

  • hiBound – The upper bound of the range.

int RandomInteger() const

Generates a random integer within the specified range.

Returns:

A random integer within the range [lowBound, hiBound].