I give it 0 and 400 and it returns me sometimes values above 400. That doesn't make sense.
- (float)randomValueBetween:(float)low andValue:(float)high {
return (((float) arc4random() / RAND_MAX) * (high - low)) + low;
}
that's actually a snippet I found on the net. Maybe someone can see the bug in there?