diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2017-02-17 16:32:16 -0800 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2017-03-29 00:40:17 -0700 |
commit | c21cbe61c6249bcfca098705df6f9b4baab9f296 (patch) | |
tree | ddc52711d82709261d7fdfb541dee9a5f7e76079 /src/random.h | |
parent | 4bd0e9b90a39c5c6a016b83882ae44cb4d28f1f8 (diff) |
Introduce FastRandomContext::randbool()
Diffstat (limited to 'src/random.h')
-rw-r--r-- | src/random.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/random.h b/src/random.h index 0464bdce14..82886bec59 100644 --- a/src/random.h +++ b/src/random.h @@ -42,6 +42,10 @@ public: return (Rw << 16) + Rz; } + bool randbool() { + return rand32() & 1; + } + uint32_t Rz; uint32_t Rw; }; |