diff options
author | Mike Buland <eichlan@xagasoft.com> | 2012-08-18 23:43:21 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2012-08-18 23:43:21 +0000 |
commit | f5ac2c1ba333ce6aa6d385d9a63b658caaa46503 (patch) | |
tree | cd78edf4663967a99c483fd0a7f0506328cab008 /src/stable/randombase.cpp | |
parent | 80aa35bbeca7d034c788be9942725dae9d3f46c4 (diff) | |
download | libbu++-f5ac2c1ba333ce6aa6d385d9a63b658caaa46503.tar.gz libbu++-f5ac2c1ba333ce6aa6d385d9a63b658caaa46503.tar.bz2 libbu++-f5ac2c1ba333ce6aa6d385d9a63b658caaa46503.tar.xz libbu++-f5ac2c1ba333ce6aa6d385d9a63b658caaa46503.zip |
Added hashtable += support, optomized the random number base some?
Diffstat (limited to 'src/stable/randombase.cpp')
-rw-r--r-- | src/stable/randombase.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/stable/randombase.cpp b/src/stable/randombase.cpp index 71a5c89..6514df3 100644 --- a/src/stable/randombase.cpp +++ b/src/stable/randombase.cpp | |||
@@ -14,18 +14,3 @@ Bu::RandomBase::~RandomBase() | |||
14 | { | 14 | { |
15 | } | 15 | } |
16 | 16 | ||
17 | int32_t Bu::RandomBase::rand( int32_t iMax ) | ||
18 | { | ||
19 | return rand( 0, iMax ); | ||
20 | } | ||
21 | |||
22 | int32_t Bu::RandomBase::rand( int32_t iMin, int32_t iMax ) | ||
23 | { | ||
24 | return iMin+(randNorm()*(iMax-iMin)); | ||
25 | } | ||
26 | |||
27 | double Bu::RandomBase::randNorm() | ||
28 | { | ||
29 | return (((uint32_t)rand())&0xfffffffeul)/(double)(0xfffffffful); | ||
30 | } | ||
31 | |||