1

Swift- Generate Random Number

 2 years ago
source link: https://gist.github.com/cemaltuysuz/e1a0cf354e4c1d815b76abaef0332d70
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
Swift- Generate Random Number · GitHub

Instantly share code, notes, and snippets.

// Generate a random number (Int, Double, Float..) let random1 = Int.random(in: 0...9) // Generate an Integer number between 1 and 9 let random2 = Double.random(in: 0...12) // Generate an Double number between 1 and 12 let random3 = Float.random(in: 0...6) // Generate an Float number between 1 and 6 . .


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK