C# intersects problem

Associate
Joined
14 Apr 2003
Posts
1,101
Hi,

I have two rectangles with coords as follows:

Rectangle 1:
Top left = (10, 0 )
bottom Right = (621, -457)

Rectangle 2:
Top left = (0, 0)
bottom right = (1024, -1024)

now that appears to me as if they are intersecting, however, when i do the intersectsWith method of either rectangle, passing in the other rectangle as a parameter it returns false.


Am i doing something wrong or is it a bug?

UPDATE: It seems to be a problem with having a minus height for my rectangles, is there any way round this?
 
Last edited:
yeah, i worked out it was a problem with negative height/width values so ive converted them all to positive, just had to rework a bit of code so wondered if there was another way round it, being lazy!!

thanks for the info and ill be sure to down load that proggy

cheers,

matt
 
Back
Top Bottom