-3
我有UISlider是0之间产生数为1,得到0之间的轮数为1
0.0590829
0.0643739
..
我想他们之间的圆角数字,比如:
0.1
0.2
0.3
...
1.0
发现this(在C):
float x = arc4random() % 11 * 0.1;
,但它不是工作迅速
var x = arc4random() % 11 * 0.1;
//error: binary operator '*' cannot be applied to operands of type 'UInt32' and 'Double'
由于
不知道人们为什么投票如“太宽”。没有显示,肯定。 –
你的代码在哪里?你有什么尝试?不要只是要求人们为你做这项工作。你会得到更多更好的答案如果你展示你的尝试,并表明你已花时间去尝试帮助自己。见[Ask] –
@AshleyMills你是绝对正确的,已修复 –