Skip to content
Snippets Groups Projects
Commit e9e82be7 authored by Michael Kuron's avatar Michael Kuron :mortar_board:
Browse files

Reorder functions from previous commit

parent f79c39a1
Branches
Tags
No related merge requests found
......@@ -48,24 +48,6 @@ void seedRandomGenerator( const std::mt19937::result_type & seed ); // std::mt19
* \brief Returns a random integral number of type INT in the range [min,max] (max included!)
*/
//**********************************************************************************************************************
template< typename INT >
INT intRandom()
{
return intRandom( std::numeric_limits<INT>::min(), std::numeric_limits<INT>::max() );
}
template< typename INT >
INT intRandom( const INT min )
{
return intRandom( min, std::numeric_limits<INT>::max(), internal::getGenerator() );
}
template< typename INT >
INT intRandom( const INT min, const INT max )
{
return intRandom( min, max, internal::getGenerator() );
}
template< typename INT >
INT intRandom( const INT min, const INT max, std::mt19937 & generator )
{
......@@ -136,6 +118,25 @@ inline signed char intRandom<signed char>( const signed char min, const signed c
}
template< typename INT >
INT intRandom( const INT min )
{
return intRandom( min, std::numeric_limits<INT>::max(), internal::getGenerator() );
}
template< typename INT >
INT intRandom( const INT min, const INT max )
{
return intRandom( min, max, internal::getGenerator() );
}
template< typename INT >
INT intRandom()
{
return intRandom( std::numeric_limits<INT>::min(), std::numeric_limits<INT>::max() );
}
template< typename INT >
class IntRandom
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment