I'd like to select a random decimal between, say, .40 and .60. So .45 or .55 would be desired. .61 not. All ranges would be between 0 and 1.
I have googled and seem to be able to do this with integers using rand()* but can't seem to get it quite right for decimals only.
Aucun commentaire:
Enregistrer un commentaire