lundi 27 avril 2015

how to make random float in swift with math operations

Get an error when trying to use multiplication

var red1 : Float = ((random()%9)*30)/255;

Error says 'int' is not convertible to 'float'

I want to use this to make a float I can use to make a UIColor




Aucun commentaire:

Enregistrer un commentaire