Functions.cpp 459 B

1234567891011121314151617181920
  1. // Copyright (C) 2009-present, 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. static std::random_device g_rd;
  10. thread_local static std::mt19937_64 g_randromGenerator(g_rd());
  11. U64 getRandom()
  12. {
  13. return g_randromGenerator();
  14. }
  15. } // end namespace anki