[interfacekit] Re: about the BRect bug

The BeBook says: Intersect() returns true if the BRect has any area?even a
corner or part of a side?in common with rect, and false if it doesn't.

So it looks like it's just the mathematical definition of intersects (taken
a rect as a collection of pixels).

My personal BRect uses this:

bool BRect::Intersects ( BRect rect ) const
{
        return !( rect.right < left || rect.left > right ||
                rect.bottom < top || rect.top > bottom );
}

It's much more simple than the one in cvs, and it seems to work ^_^.

Marc Flerackers (mflerackers@xxxxxxxxxx)
Software Engineer
ANDROME NV

> -----Original Message-----
> From: interfacekit-bounce@xxxxxxxxxxxxx
> [mailto:interfacekit-bounce@xxxxxxxxxxxxx]On Behalf Of
> burton666@xxxxxxxxxxx
> Sent: dinsdag 3 december 2002 9:32
> To: interfacekit@xxxxxxxxxxxxx
> Subject: [interfacekit] about the BRect bug
>
>
>
> I don't think this is a bug. If a Rect
> totally contains another, the two perimeters never intersects. So
> it could be that
> Intersects() means "the perimeter intersects...".
>
> -----------------------------------------------------
> Invia un sms gratis!
> http://freesms.supereva.it/index.php
>
> messaggio inviato con Freemail by www.superEva.it
> -----------------------------------------------------
>
>


Other related posts: