I would do it as such. Assuming you want the floating number to be displayed to only 2dp.
- I would first, generate an integer between 1-9, then divide it by 10.
- Then I would have a second random function that generates either 0.05 or 0.0
- I would then add the two together.
So for example:-
7 / 10 = 0.7
0.05
0.7 + 0.05 = 0.75
Last edited by iamthwee; Dec 30th, 2007 at 12:31 pm.
Reputation Points: 1536
Solved Threads: 431
Posting Expert
Offline 5,865 posts
since Aug 2005