Tuesday 15 May 2012

ios - Know the intersection point of two CGRect -


I am programming a game, and I have to find holes between two CGR contacts. To do this, I have no problem. I do this:

  CGRact Rect 1 = CGRactMac (X1, Y1, A1, B1); CGRect rect2 = CGRectMake (x2, y2, a2, b2); If (CgTTIntextx Retact (Recta1, Recta2)) {// Some stuff ...}   

I have no problem but if I get the precise point of intersection with this two CGRCect wanted to know? And if this is possible, then how?

Thank you!

To obtain the common part of the two intersecting rectangles, by the result of that function call, Can calculate using the edges of

No comments:

Post a Comment