--- a/Random.st Mon Oct 12 14:52:26 2009 +0200
+++ b/Random.st Mon Oct 12 15:10:01 2009 +0200
@@ -314,6 +314,16 @@
!Random methodsFor:'Compatibility-Squeak'!
+nextInt:upperBound
+ "Answer a random integer in the interval [1, anInteger]."
+
+ ^ self nextIntegerBetween:1 and:upperBound
+
+ "
+ Random new nextInt:10
+ "
+!
+
nextIntFrom:lowerBound to:upperBound
"return a random integer in the given range"
@@ -598,9 +608,9 @@
!Random class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic2/Random.st,v 1.41 2009-10-04 20:07:33 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic2/Random.st,v 1.42 2009-10-12 13:10:01 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic2/Random.st,v 1.41 2009-10-04 20:07:33 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic2/Random.st,v 1.42 2009-10-12 13:10:01 cg Exp $'
! !