Re: Cocoa and bit handling
Re: Cocoa and bit handling
- Subject: Re: Cocoa and bit handling
- From: Jiri Volejnik <email@hidden>
- Date: Tue, 21 Dec 2004 15:24:41 +0100
Oops, it was wrong! Sorry, here is a better version :-)
byte CopyOneBit(byte source, unsigned sourceBit, byte target, unsigned
targetBit)
{
byte bit = source & (1 << sourceBit);
byte mask = 1 << targetBit;
return bit ? target | mask : target & ~mask;
}
Jirka
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden