--- a/Random.st Wed Oct 22 14:15:30 2008 +0200
+++ b/Random.st Wed Oct 22 15:18:25 2008 +0200
@@ -362,7 +362,8 @@
nextBoolean
"return true or false by random"
- ^ self next < 0.5
+ ^ self nextInteger < (modulus / 2)
+"/ ^ self next < 0.5
"|r|
r := Random new.
@@ -382,7 +383,7 @@
Transcript showCR:bag contents
"
- "Modified: / 21.8.1998 / 14:45:55 / cg"
+ "Modified: / 22-10-2008 / 15:17:57 / cg"
!
nextByte
@@ -583,5 +584,5 @@
!Random class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic2/Random.st,v 1.39 2008-10-22 12:15:30 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic2/Random.st,v 1.40 2008-10-22 13:18:25 cg Exp $'
! !