jeudi 6 août 2020

Using "if" on two numbers; should I use bit operation or logical operation? [closed]

I wanna test if more numbers at once are equal to zero, and I wonder which option is preferable:

a) if(x == 0 && y == 0)

b) if( (x|y) == 0)

Aucun commentaire:

Enregistrer un commentaire