1
0

random.h 633 B

123456789101112131415161718192021222324252627282930
  1. #ifndef NULLSOFT_WINAMP_RANDOM_H
  2. #define NULLSOFT_WINAMP_RANDOM_H
  3. #include "api_random.h"
  4. #include <windows.h> // for DWORD
  5. class Random : public api_random
  6. {
  7. public:
  8. static const char *getServiceName() { return "Random Number API"; }
  9. static const GUID getServiceGuid() { return randomApiGUID; }
  10. public:
  11. Random();
  12. RandomGenerator GetFunction();
  13. UnsignedRandomGenerator GetUnsignedFunction();
  14. int GetNumber();
  15. int GetPositiveNumber();
  16. float GetFloat(); // [0-1]
  17. float GetFloat_LessThanOne(); // [0-1)
  18. float GetFloat_LessThanOne_NotZero(); // (0-1)
  19. double GetDouble(); // [0-1)
  20. protected:
  21. RECVS_DISPATCH;
  22. };
  23. #endif