[interfacekit] Re: BRect implementation
- From: Ingo Weinhold <bonefish@xxxxxxxxxxxxxxx>
- To: interfacekit@xxxxxxxxxxxxx
- Date: Thu, 16 Oct 2003 00:46:11 +0200
On 2003-10-15 at 16:59:31 [+0200], burton666@xxxxxxxxx wrote:
> ---------- Initial Header -----------
>
> >From : interfacekit-bounce@xxxxxxxxxxxxx
> To : "interfacekit" interfacekit@xxxxxxxxxxxxx
> Cc :
> Date : Wed, 15 Oct 2003 13:40:33 +0200
> Subject : [interfacekit] BRect implementation
>
> > I guess you already know that our current BRect implementation has a
> > serious flaw
> > (BRect::Intersects() return false if one rect completely contains the
> > other
> > one). I guess it's time to fix it. This is the code: blablabla. Can I
> > commit
> > it ?
> ^^^^^^
> Whoops! this "blablabla" isn't exactly the code I wanted to put there... I
> guess I should re-read my emails before sending them ;P
> I hope that no one felt offended by that :)
>
> The code should look like:
>
> bool
> BRect::Intersects(BRect rect)
> {
> if !(rect.left > right || rect.right < left || rect.top > bottom ||
> rect.bottom < top)
> return true;
> return false;
> }
Looks good.
CU, Ingo
- References:
- [interfacekit] Re: BRect implementation
- From: burton666@xxxxxxxxx
Other related posts:
- » [interfacekit] BRect implementation
- » [interfacekit] Re: BRect implementation
- » [interfacekit] Re: BRect implementation
- » [interfacekit] Re: BRect implementation
- [interfacekit] Re: BRect implementation
- From: burton666@xxxxxxxxx