Random.st
changeset 1127 2bace63d7bd5
parent 998 5f66a2dd6b7d
child 1128 72d61e6ef2b1
equal deleted inserted replaced
1126:0ca4b7558465 1127:2bace63d7bd5
   503      unless you know what you are doing!!"
   503      unless you know what you are doing!!"
   504 
   504 
   505     seed := Time millisecondClockValue bitAnd:16rFFFF.
   505     seed := Time millisecondClockValue bitAnd:16rFFFF.
   506     RandomSalt isNil ifTrue:[
   506     RandomSalt isNil ifTrue:[
   507         RandomSalt := 1.
   507         RandomSalt := 1.
       
   508     ] ifFalse:[
       
   509         RandomSalt := RandomSalt + 1.
   508     ].
   510     ].
   509     seed := seed + RandomSalt.
   511     seed := seed + RandomSalt.
   510     multiplier := 1597.
   512     multiplier := 1597.
   511     increment := 51749.
   513     increment := 51749.
   512     modulus := 244944.
   514     modulus := 244944 " 244957 " .
       
   515 
       
   516     self step.
   513 
   517 
   514     "Modified: / 1.4.1997 / 22:44:13 / cg"
   518     "Modified: / 1.4.1997 / 22:44:13 / cg"
   515     "Modified: / 12.11.1999 / 17:50:52 / stefan"
   519     "Modified: / 12.11.1999 / 17:50:52 / stefan"
   516 !
   520 !
   517 
   521 
   544 ! !
   548 ! !
   545 
   549 
   546 !Random class methodsFor:'documentation'!
   550 !Random class methodsFor:'documentation'!
   547 
   551 
   548 version
   552 version
   549     ^ '$Header: /cvs/stx/stx/libbasic2/Random.st,v 1.30 2001-11-17 11:08:36 cg Exp $'
   553     ^ '$Header: /cvs/stx/stx/libbasic2/Random.st,v 1.31 2002-12-06 10:17:28 cg Exp $'
   550 ! !
   554 ! !