Force bitwise operation to return only 0 or 1
#2

pawn Код:
new a = !!(test & 8);
That should work. Though I don't really understand why you would want to get 1 and 0 instead of true and false.
Reply


Messages In This Thread
Force bitwise operation to return only 0 or 1 - by Misiur - 19.03.2013, 13:51
Re: Force bitwise operation to return only 0 or 1 - by Vince - 19.03.2013, 13:58
Re: Force bitwise operation to return only 0 or 1 - by Misiur - 19.03.2013, 14:00

Forum Jump:


Users browsing this thread: 1 Guest(s)