diff options
author | Jean-Francois Mauguit <jfmauguit@mac.com> | 2024-09-24 09:03:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 09:03:25 -0400 |
commit | bab614c421ed7ae329d26bf028c4a3b1d2450f5a (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/Winamp/random.h | |
parent | 4bde6044fddf053f31795b9eaccdd2a5a527d21f (diff) | |
parent | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (diff) | |
download | winamp-bab614c421ed7ae329d26bf028c4a3b1d2450f5a.tar.gz |
Merge pull request #5 from WinampDesktop/community
Merge to main
Diffstat (limited to 'Src/Winamp/random.h')
-rw-r--r-- | Src/Winamp/random.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Src/Winamp/random.h b/Src/Winamp/random.h new file mode 100644 index 00000000..a91565be --- /dev/null +++ b/Src/Winamp/random.h @@ -0,0 +1,30 @@ +#ifndef NULLSOFT_WINAMP_RANDOM_H +#define NULLSOFT_WINAMP_RANDOM_H + +#include "api_random.h" +#include <windows.h> // for DWORD + + +class Random : public api_random +{ +public: + static const char *getServiceName() { return "Random Number API"; } + static const GUID getServiceGuid() { return randomApiGUID; } +public: + Random(); + RandomGenerator GetFunction(); + UnsignedRandomGenerator GetUnsignedFunction(); + int GetNumber(); + int GetPositiveNumber(); + float GetFloat(); // [0-1] + float GetFloat_LessThanOne(); // [0-1) + float GetFloat_LessThanOne_NotZero(); // (0-1) + double GetDouble(); // [0-1) +protected: + RECVS_DISPATCH; + + + +}; + +#endif
\ No newline at end of file |