- (float)randomFloatBetween:(float)num1 andLargerFloat:(float)num2
{
int startVal = num1*10000;
int endVal = num2*10000;
int randomValue = startVal +(arc4random()%(endVal - startVal));
float a = randomValue;
return(a /10000.0);
}
生成指定范围内的随机数
最新推荐文章于 2021-10-10 01:20:02 发布