better seeding
authorClaus Gittinger <cg@exept.de>
Wed, 01 Oct 2014 17:17:16 +0200
changeset 3389 25702635a819
parent 3388 379593c9d8ae
child 3390 5d3e4ea61bc5
better seeding
RandomMT19937.st
--- a/RandomMT19937.st	Wed Oct 01 17:17:14 2014 +0200
+++ b/RandomMT19937.st	Wed Oct 01 17:17:16 2014 +0200
@@ -267,7 +267,7 @@
 new
     ^ self basicNew 
         initialize;
-        initGenRand:(Time millisecondClockValue)
+        initGenRand:(Random randomSeed bitAnd:16rFFFFFFFF)
 !
 
 new:seed
@@ -410,10 +410,10 @@
 !RandomMT19937 class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic2/RandomMT19937.st,v 1.3 2014-10-01 12:50:57 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/RandomMT19937.st,v 1.4 2014-10-01 15:17:16 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic2/RandomMT19937.st,v 1.3 2014-10-01 12:50:57 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/RandomMT19937.st,v 1.4 2014-10-01 15:17:16 cg Exp $'
 ! !