Earlier today I wanted to start using the Swift ternary operator to not set values but to fire different functions.
if position.x < kWidth / 2 ? fireLeft() : fireRight()
it does not work, and I am actually quite surprised is does not work, can anyone help me understand why it does not work, and if it can be made to work?
thanks a bunch
Aucun commentaire:
Enregistrer un commentaire