Top "Arc4random" questions

The arc4random() function returns pseudo-random numbers in the range of 0 to (2*32)-1

How does one make random number between range for arc4random_uniform()?

so my goal in this codebit is to randomly roll two dice and as we all know your regular die …

range swift arc4random
Generating random numbers with Swift

I need to generate a random number. It appears the arc4random function no longer exists as well as the …

swift arc4random
Generate Random Numbers Between Two Numbers in Objective-C

I have two text boxes and user can input 2 positive integers (Using Objective-C). The goal is to return a random …

objective-c random arc4random
Generate a random float between 0 and 1

I'm trying to generate a random number that's between 0 and 1. I keep reading about arc4random(), but there isn't any …

ios c random floating-point arc4random
Swift random float between 0 and 1

In Swift, I'm trying to get a random float between 0 and 1 but I can't seem to get the type conversions …

swift random arc4random cgfloat
How to select range of values when using arc4random()

Can I set a range of numbers when using arc4random()? For example 50-100 only.

ios objective-c arc4random
What's the difference between arc4random and arc4random_uniform?

I've seen old posts about the differences between random and arc4random in Objective-C, and I've seen answers to this …

objective-c random arc4random
Cannot convert value of type 'Int' to expected argument type 'UInt32'

I am trying to generate a random number in Swift: var amountOfQuestions = 2 var randomNumber = Int(arc4random_uniform(amountOfQuestions - 1)) + 1 …

ios swift integer arc4random uint32
Get random object from Array

I want to get random object from array, is there any way how can I find random object from mutable …

iphone arc4random
Create an array of random numbers in Swift

I'm just starting to learn Swift. I'm attempting to create an array of several random numbers, and eventually sort the …

ios arrays swift arc4random