I was wondering if this is the best way to generate a random number in Swift.
This is what I have thought of thus far:
var randomNumber:Int = random() * 100 + 1 //What value does this return?
I was wondering if this is a viable 1 - 100 range in Swift utilizing the random() function? I am unsure if this is. I have not dealt with random numbers much in Swift 2. However in Java, the equivalent would be Math.random() * 100 + 1
I'm curious to know what would be the equivalent of this in Swift 2. Thanks in advance!