Random.st
changeset 4614 86242cfe8f40
parent 4613 7229c9649f3e
child 4627 62d147dd6abc
--- a/Random.st	Fri Mar 02 18:52:47 2018 +0100
+++ b/Random.st	Fri Mar 02 18:54:07 2018 +0100
@@ -435,12 +435,13 @@
 
     |rnd|
 
-    rnd := self next.
+    rnd := self nextInteger.
     rnd := rnd * (stop - start) asFloat.
     rnd := rnd + start asFloat.
     ^ rnd
 
-    "|r|
+    "
+     |r|
      r := Random new.
      Transcript showCR:(r nextBetween:1 and:10).
      Transcript showCR:(r nextBetween:1 and:10).
@@ -454,7 +455,7 @@
 nextBoolean
     "return true or false by random"
 
-    ^ self next bitAnd:16r10.
+    ^ self nextInteger bitAnd:16r10.
 
     "
     |r|
@@ -481,7 +482,7 @@
 nextByte
     "return the next integral random number byte in the range 0 .. 16rFF"
 
-    ^ self next bitAnd:16rFF
+    ^ self nextInteger bitAnd:16rFF
 
     "
      |r|
@@ -537,7 +538,7 @@
     "get the next cnt printable characters.
      We answer printable characters in the ascii range (codepoints 32 - 126)"
 
-    ^ (1 to:count) collect:[:i | Character value:(self next \\ 94 + 32) ] as:String
+    ^ (1 to:count) collect:[:i | Character value:(self nextInteger \\ 94 + 32) ] as:String
 
     "
       RandomGenerator new nextCharacters:8