CitroFlex3ds 0.1
CitroFlex3DS is a lightweight game engine designed specifically for Nintendo 3DS homebrew development. It provides a simple framework for creating games and applications.
 
Loading...
Searching...
No Matches
Random Namespace Reference

Utility namespace for random number generation. More...

Functions

int Range (int min, int max)
 Generates a random integer in the range [min, max].
 
double Range (double min, double max)
 Generates a random floating-point number in the range [min, max].
 
std::string UUID ()
 Generates a random UUID v4.
 
std::mt19937 & GetGenerator ()
 Gets the random number generator instance.
 

Detailed Description

Utility namespace for random number generation.

Function Documentation

◆ GetGenerator()

std::mt19937 & Random::GetGenerator ( )

Gets the random number generator instance.

Returns
A reference to the Mersenne Twister generator
Note
Internal function used by other namespace functions

◆ Range() [1/2]

double Random::Range ( double min,
double max )

Generates a random floating-point number in the range [min, max].

Parameters
minThe minimum value (inclusive)
maxThe maximum value (inclusive)
Returns
A random float between min and max

◆ Range() [2/2]

int Random::Range ( int min,
int max )

Generates a random integer in the range [min, max].

Parameters
minThe minimum value (inclusive)
maxThe maximum value (inclusive)
Returns
A random integer between min and max

◆ UUID()

std::string Random::UUID ( )

Generates a random UUID v4.

Returns
A string representing the UUID in 8-4-4-4-12 format