aboutsummaryrefslogtreecommitdiff
path: root/src/stable/randomcmwc.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-11-09 18:15:04 +0000
committerMike Buland <eichlan@xagasoft.com>2012-11-09 18:15:04 +0000
commit79843b51267d7a8faf8e9dcee09fa5e167373e6d (patch)
treecc317f202fa6b7b68908af9bee1848355681db78 /src/stable/randomcmwc.cpp
parentba177923d7b60800ae2e01f80fc10dc8ad1594bb (diff)
downloadlibbu++-79843b51267d7a8faf8e9dcee09fa5e167373e6d.tar.gz
libbu++-79843b51267d7a8faf8e9dcee09fa5e167373e6d.tar.bz2
libbu++-79843b51267d7a8faf8e9dcee09fa5e167373e6d.tar.xz
libbu++-79843b51267d7a8faf8e9dcee09fa5e167373e6d.zip
Added seed parameter to constructor of two PRNGs. Also fixed horrible mistake
in RandomBasic.
Diffstat (limited to '')
-rw-r--r--src/stable/randomcmwc.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/stable/randomcmwc.cpp b/src/stable/randomcmwc.cpp
index 1d4a913..b1c3cdb 100644
--- a/src/stable/randomcmwc.cpp
+++ b/src/stable/randomcmwc.cpp
@@ -11,11 +11,12 @@
11 11
12#define PHI 0x9e3779b9 12#define PHI 0x9e3779b9
13 13
14Bu::RandomCmwc::RandomCmwc() : 14Bu::RandomCmwc::RandomCmwc( int32_t iSeed ) :
15 q( 0 ), 15 q( 0 ),
16 c( 362436 ) 16 c( 362436 )
17{ 17{
18 q = new uint32_t[4096]; 18 q = new uint32_t[4096];
19 seed( iSeed );
19} 20}
20 21
21Bu::RandomCmwc::~RandomCmwc() 22Bu::RandomCmwc::~RandomCmwc()