RandomGNUSmalltalk.st
changeset 5251 567f7b09329b
parent 4610 73aae1b4cc57
--- a/RandomGNUSmalltalk.st	Mon Nov 18 17:44:07 2019 +0100
+++ b/RandomGNUSmalltalk.st	Mon Nov 18 17:44:15 2019 +0100
@@ -132,24 +132,6 @@
     ^ modulus
 !
 
-next
-    "return the next random number in the range ]0..1["
-
-    self step.
-    ^ seed / modulus asFloat
-
-    "
-     |r|
-     r := Random new.
-     Transcript showCR:r next.
-     Transcript showCR:r next.
-     Transcript showCR:r next.
-     Transcript showCR:r next.
-    "
-
-    "Modified: 1.4.1997 / 22:44:46 / cg"
-!
-
 nextBoolean
     "return true or false by random"
 
@@ -231,6 +213,26 @@
     "Modified: 1.4.1997 / 22:43:01 / cg"
 ! !
 
+!RandomGNUSmalltalk methodsFor:'reading'!
+
+next
+    "return the next random number in the range ]0..1["
+
+    self step.
+    ^ seed / modulus asFloat
+
+    "
+     |r|
+     r := Random new.
+     Transcript showCR:r next.
+     Transcript showCR:r next.
+     Transcript showCR:r next.
+     Transcript showCR:r next.
+    "
+
+    "Modified: 1.4.1997 / 22:44:46 / cg"
+! !
+
 !RandomGNUSmalltalk class methodsFor:'documentation'!
 
 version