I have UISlider that produce numbers between 0 to 1,
0.0590829
0.0643739
..
I want to get the rounded number between them, like:
0.1
0.2
0.3
...
1.0
found this (in c):
float x = arc4random() % 11 * 0.1;
but its not working on swift
var x = arc4random() % 11 * 0.1;
//error: binary operator '*' cannot be applied to operands of type 'UInt32' and 'Double'
Thanks