Class FloatRandomFunction

Class Documentation

class FloatRandomFunction

Class for generating random floating-point numbers within a specified range.

Public Functions

explicit FloatRandomFunction(int seed = 0)

Constructor that initializes the random seed.

Parameters:

seed – The seed value for the random number generator.

explicit FloatRandomFunction(float lowBound, float hiBound)

Constructor that sets the range for random floating-point numbers.

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

  • hiBound – The upper bound of the range.

float RandomFloat() const

Generates a random float within the specified range.

Returns:

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

double RandomDouble() const

Generates a random double within the specified range.

Returns:

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