very early prototype of a spaceshooter in SFML
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

random.hpp 348B

12345678910111213141516
  1. #pragma once
  2. #include <random>
  3. namespace Proto4 {
  4. namespace Random {
  5. std::random_device r;
  6. std::seed_seq seed{r(), r(), r(), r(), r(), r(), r(), r()};
  7. std::mt19937 eng{seed};
  8. std::uniform_real_distribution<> dist(0, 1);
  9. }
  10. inline float randomFloat() {
  11. return Random::dist(Random::eng);
  12. }
  13. }