dimanche 29 avril 2018

How can your generate a decimal between a specific range using Swift? [duplicate]

This question already has an answer here:

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