lundi 26 février 2018

Generate a random number between negative and positive in swift

So I'm trying to generate a random number between negative and positive range because I need to give an object a position on the x axis. I've tried with arc4random and arc4random_uniform but it doesn't work. I need a way to generate a random position on the x axis, negative and positive.




Aucun commentaire:

Enregistrer un commentaire