This question already has an answer here:
- Swift random float between 0 and 1 8 answers
How can you generate a random decimal between 0.0 and 0.25 using Swift in Xcode.
This is the closest thing I could find, but it doesn't do what I desired:
let percent = drand48()
It generates a random number between 0.0 and 1.0.
Aucun commentaire:
Enregistrer un commentaire