#pragma once

/**
 * \file Random.h
 * \brief Defines functions for generating random numbers.
 */

#include <random>

namespace blitz {
namespace utils {

/**
 * \brief Returns a random integer between min and max.
 * \param min The minimum value.
 * \param max The maximum value.
 * \return A random integer between min and max.
 */
template <typename NumberType>
NumberType GetRandomInt(NumberType min, NumberType max) {
	std::random_device randomDevice;
	std::mt19937 generator(randomDevice());
	std::uniform_int_distribution<NumberType> distrib(min, max);
	return distrib(generator);
}

/**
 * \brief Returns a random real number between min and max.
 * \param min The minimum value.
 * \param max The maximum value.
 * \return A random real number between min and max.
 */
template <typename NumberType>
NumberType GetRandomReal(NumberType min, NumberType max) {
	std::random_device randomDevice;
	std::mt19937 generator(randomDevice());
	std::uniform_real_distribution<NumberType> distrib(min, max);
	return distrib(generator);
}

}  // namespace utils
}  // namespace blitz
