changed initial seed generation, to avoid repeating
initial numbers, in case of many generators beeing
created within the same millisecond
--- a/Random.st Fri Nov 29 12:09:14 2002 +0100
+++ b/Random.st Fri Dec 06 11:17:28 2002 +0100
@@ -505,11 +505,15 @@
seed := Time millisecondClockValue bitAnd:16rFFFF.
RandomSalt isNil ifTrue:[
RandomSalt := 1.
+ ] ifFalse:[
+ RandomSalt := RandomSalt + 1.
].
seed := seed + RandomSalt.
multiplier := 1597.
increment := 51749.
- modulus := 244944.
+ modulus := 244944 " 244957 " .
+
+ self step.
"Modified: / 1.4.1997 / 22:44:13 / cg"
"Modified: / 12.11.1999 / 17:50:52 / stefan"
@@ -546,5 +550,5 @@
!Random class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic2/Random.st,v 1.30 2001-11-17 11:08:36 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic2/Random.st,v 1.31 2002-12-06 10:17:28 cg Exp $'
! !