[interfacekit] Re: about the BRect bug

Eric wrote:
> burton666@xxxxxxxxxxx wrote:
> > 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...".
> 
> According to the BeBook "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."  If "rect" is entirely contained within the 
BRect, 
> then the entire area of "rect" is "in common" and, therefore, 
> intersecting.  I'm still of the opinion that this is a bug.

I think that BeBook is bugged on this topic:
bool BRect::Contains(BRect rect) and bool BRect::Intersect(BRect rect) 
looks like 
way too much redundant for entirely contained "rect".

Sounds like rect=5Fa->Intersect(rect=5Fb) return true *only* if rect=5Fb 
really intersect 
rect=5Fa, that is some area is NOT inside rect=5Fa.
Not a valid implementation of geometric intersection concept, 
however...
IIRC, it was an old BeBugs entry too, but was never fixed...

-Philippe

--
Fortune Cookie Says:

Life is like an analogy


Other related posts: