网站建设资讯

NEWS

网站建设资讯

IOS取随机数

  1. int value = arc4random() % x;
  2. #define ARC4RANDOM_MAX 0x100000000
  3. double val = floorf(((double)arc4random() / ARC4RANDOM_MAX) * 100.0f);    

标题名称:IOS取随机数
当前网址:http://cdweb.net/article/gdsjed.html