34 lines
1.4 KiB
C++
34 lines
1.4 KiB
C++
|
/****************************************************************************************
|
||
|
* \file SHMathHelpers.cpp
|
||
|
* \author Diren D Bharwani, diren.dbharwani, 390002520
|
||
|
* \brief Implementation for various mathematical helper functions.
|
||
|
*
|
||
|
* \copyright Copyright (C) 2022 DigiPen Institute of Technology. Reproduction or
|
||
|
* disclosure of this file or its contents without the prior written consent
|
||
|
* of DigiPen Institute of Technology is prohibited.
|
||
|
****************************************************************************************/
|
||
|
|
||
|
#include <SHpch.h>
|
||
|
#include <chrono>
|
||
|
|
||
|
// Primary Header
|
||
|
#include "SHMathHelpers.h"
|
||
|
|
||
|
namespace SHADE
|
||
|
{
|
||
|
/*-----------------------------------------------------------------------------------*/
|
||
|
/* Static Data Member Definitions */
|
||
|
/*-----------------------------------------------------------------------------------*/
|
||
|
|
||
|
std::default_random_engine SHMath::rng;
|
||
|
|
||
|
/*-----------------------------------------------------------------------------------*/
|
||
|
/* Static Function Member Definitions */
|
||
|
/*-----------------------------------------------------------------------------------*/
|
||
|
|
||
|
void SHMath::Initialise()
|
||
|
{
|
||
|
const unsigned SEED = static_cast<unsigned>(std::chrono::system_clock::now().time_since_epoch().count());
|
||
|
rng.seed(SEED);
|
||
|
}
|
||
|
}
|