Wrath of Zeus
Made by Torchlight Games for CSE 125 SP24
Loading...
Searching...
No Matches
Functions
rng.hpp File Reference

Go to the source code of this file.

Functions

double randomDouble (double min, double max)
 
int randomInt (int min, int max)
 

Function Documentation

◆ randomDouble()

double randomDouble ( double  min,
double  max 
)

Generate a random double between given min and max values.

See also
https://en.cppreference.com/w/cpp/numeric/random/uniform_real_distribution
Parameters
mininclusive lower end of range for random number
minexclusive upper end of range for random number
Returns
random double within the specified range

◆ randomInt()

int randomInt ( int  min,
int  max 
)

Generate a random integer between given min and max values.

See also
https://en.cppreference.com/w/cpp/numeric/random/uniform_int_distribution
Parameters
mininclusive lower end of range for random number
mininclusive upper end of range for random number
Returns
random integer within the specified range