Functions.cpp 458 B

12345678910111213141516171819
  1. // Copyright (C) 2009-2021, Panagiotis Christopoulos Charitos and contributors.
  2. // All rights reserved.
  3. // Code licensed under the BSD License.
  4. // http://www.anki3d.org/LICENSE
  5. #include <AnKi/Util/Functions.h>
  6. #include <AnKi/Util/HighRezTimer.h>
  7. #include <random>
  8. namespace anki {
  9. thread_local std::mt19937_64 g_randromGenerator(U64(HighRezTimer::getCurrentTime() * 1000000.0));
  10. U64 getRandom()
  11. {
  12. return g_randromGenerator();
  13. }
  14. } // end namespace anki