--- a/Random.st Mon Nov 18 17:43:20 2019 +0100
+++ b/Random.st Mon Nov 18 17:44:07 2019 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
@@ -139,23 +137,6 @@
!Random class methodsFor:'random numbers'!
-next
- "return the next random number in the range 0..1
- This method behaves like the corresponding instance method,
- but allows generation of random numbers without
- a need for an instance of Random to be kept around.
- This uses a common, shared generator."
-
- ^ self sharedGenerator next.
-
- "
- Transcript showCR:(Random next).
- Transcript showCR:(Random next).
- Transcript showCR:(Random next).
- Transcript showCR:(Random next).
- "
-!
-
next:n
"return the next n random numbers in the range 0..1
This method behaves like the corresponding instance method,
@@ -281,6 +262,25 @@
"Modified: 21.8.1997 / 18:08:56 / cg"
! !
+!Random class methodsFor:'reading'!
+
+next
+ "return the next random number in the range 0..1
+ This method behaves like the corresponding instance method,
+ but allows generation of random numbers without
+ a need for an instance of Random to be kept around.
+ This uses a common, shared generator."
+
+ ^ self sharedGenerator next.
+
+ "
+ Transcript showCR:(Random next).
+ Transcript showCR:(Random next).
+ Transcript showCR:(Random next).
+ Transcript showCR:(Random next).
+ "
+! !
+
!Random class methodsFor:'seeding'!
randomSeed
@@ -442,23 +442,6 @@
!Random methodsFor:'accessing-reading'!
-next
- "return the next random number in the range ]0..1["
-
- self subclassResponsibility.
-
- "
- |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"
-!
-
next:count
"return the next count random numbers in the range ]0..1["
@@ -917,6 +900,25 @@
self subclassResponsibility
! !
+!Random methodsFor:'reading'!
+
+next
+ "return the next random number in the range ]0..1["
+
+ self subclassResponsibility.
+
+ "
+ |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"
+! !
+
!Random methodsFor:'testing'!
atEnd