You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
444 B
18 lines
444 B
#include "Random.h"
|
|
|
|
|
|
INT RndGetRandomInt(INT min, INT max)
|
|
{
|
|
std::random_device rd;
|
|
std::default_random_engine generator(rd());
|
|
std::uniform_int_distribution<ULONG> distribution(min, max);
|
|
return distribution(generator);
|
|
}
|
|
|
|
FLOAT RndGetRandomFloat(FLOAT min, FLOAT max)
|
|
{
|
|
std::random_device Random;
|
|
std::mt19937 RandomGenerator(Random());
|
|
std::uniform_real<FLOAT> RandomDistribute(min, max);
|
|
return RandomDistribute(RandomGenerator);
|
|
} |