Random.st
changeset 973 ec6bced2d1f5
parent 947 23faa406af1f
child 978 5a4c98ef6584
--- 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 $'
 ! !