Functions.cpp 458 B

1234567891011121314151617181920
  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. {
  10. thread_local std::mt19937_64 g_randromGenerator(U64(HighRezTimer::getCurrentTime() * 1000000.0));
  11. U64 getRandom()
  12. {
  13. return g_randromGenerator();
  14. }
  15. } // end namespace anki