int x = arc4random() % 100; // 获取一个随机整数范围 0 ~ 99
// 获取一个随机整数,范围在[from,to),包括from,不包括to
int getScopeInsideRandomValue(int from, int to) {
return (int)(from + (arc4random() % (to - from + 1)));
}
int x = arc4random() % 100; // 获取一个随机整数范围 0 ~ 99
// 获取一个随机整数,范围在[from,to),包括from,不包括to
int getScopeInsideRandomValue(int from, int to) {
return (int)(from + (arc4random() % (to - from + 1)));
}