I want to generate a random number in Swift within a function deployed to OpenWhisk on IBM Bluemix.
Because it's a Linux runtime, I can't use arc4random_uniform()
. I also don't want to use drand48()
because it doesn't give me a truly random number (psuedo-random sequence).
Still, so far I've tried...
let answer = drand48() * 10000
...which yields 3.90798504668055e-10
Any ideas?