标签:style blog http io color ar os sp div
Note:Here’s how the above method works.arc4random() gives you a randominteger between 0 andARC4RANDOM_MAX. If you divide that number byARC4RANDOM_MAX, you get a float between 0 and 1.
If you multiply this value by the range of values (max– min), you’ll get a floatbetween 0 and the range. If you add to that themin value, you’ll get a floatbetweenmin andmax. Viola?, job done!
标签:style blog http io color ar os sp div
原文地址:http://blog.csdn.net/leochang130731/article/details/40746641