add salt to seed (in case random generators are created
fast - within the same millisecond)
--- a/Random.st Tue Aug 21 17:52:19 2001 +0200
+++ b/Random.st Wed Aug 22 20:26:54 2001 +0200
@@ -28,7 +28,7 @@
Stream subclass:#Random
instanceVariableNames:'seed increment multiplier modulus'
- classVariableNames:'RandomGenerator'
+ classVariableNames:'RandomGenerator RandomSalt'
poolDictionaries:''
category:'Magnitude-Numbers'
!
@@ -502,6 +502,10 @@
unless you know what you are doing!!"
seed := Time millisecondClockValue bitAnd:16rFFFF.
+ RandomSalt isNil ifTrue:[
+ RandomSalt := 1.
+ ].
+ seed := seed + RandomSalt.
multiplier := 1597.
increment := 51749.
modulus := 244944.
@@ -541,5 +545,5 @@
!Random class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic2/Random.st,v 1.27 2000-12-20 18:46:53 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic2/Random.st,v 1.28 2001-08-22 18:26:54 cg Exp $'
! !