I'm trying to generate a random number that's between 0 and 1. I keep reading about arc4random()
, but there isn't any information about getting a float from it. How do I do this?
相关问题
- Multiple sockets for clients to connect to
- Core Data lightweight migration crashes after App
- What is the best way to do a search in a large fil
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
The previous post stating "rand()" alone was incorrect. This is the correct way to use rand().
This will create a number between 0 -> 1