mardi 28 juillet 2015

Setting max x and y values for Swift

I was trying to put a random number generator in my code today and I was going to use the maximum x and y values for it. Here is a snippet of my code:

var rand_x = CGFloat(arc4random_uniform(maxXValue)) 
var rand_y = CGFloat(arc4random_uniform(maxYValue)) 

But I continue to get the error message:

Use of unresolved identifier 'maxXValue' Use of unresolved identifier 'maxYValue'

Any tips to fix this problem? Thanks!




Aucun commentaire:

Enregistrer un commentaire