![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 | |
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5
![]() |
Quote:
![]() |
|
|
|
|
|
|
#12 |
|
Sexy Programmer
|
lol hell yeah!
__________________
I would love to change the world, but they won't give me the source code! |
|
|
|
|
|
#13 |
|
Programmer
Join Date: Oct 2005
Posts: 68
Rep Power: 3
![]() |
oh, so its like
0 <= range < 1 ? All right. Thanks |
|
|
|
|
|
#14 |
|
Sexy Programmer
|
correcto hombre!
__________________
I would love to change the world, but they won't give me the source code! |
|
|
|
|
|
#15 |
|
Newbie
|
try this:
Random randomNumber = new Random(); //System.out.println(randomNumber.nextDouble()); for (int i = 0 ; i < 25 ; i++ ) System.out.println(6 + randomNumber.nextInt(4) + randomNumber.nextDouble()); this is a sample run: 6.95024411452378 8.984710728367434 7.676017897878788 9.912265649942277 6.280182735503483 7.1027155377329505 8.08007342026028 9.366193420493138 9.41443596850575 7.754715326042548 7.76242243321119 9.931977732359908 9.041430710331346 8.856345083925039 8.013217034792513 8.07149075911434 6.907854553043988 9.11328827937263 8.212997676355142 7.726108944876039 7.830853487056025 9.567757499627561 6.492143447243985 7.796354471280454 9.020392284622606 |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|