获取一个随机整数,范围在[from,to],包括from,包括to
- (int)getRandomNumber:(int)from to:(int)to {
return (int)(from + (arc4random() % (to – from + 1)));
}
获取一个随机整数,范围在[from,to],包括from,包括to
- (int)getRandomNumber:(int)from to:(int)to {
return (int)(from + (arc4random() % (to – from + 1)));
}