Advertisement

09.25.2004 at 08:22AM PDT, ID: 21144945
[x]
Attachment Details

Rectangle intersection

Asked by kimos123 in C Programming Language

Tags: intersection, rectangle

hi all,

how to calculate the intersection of 2 rectangle?

a rectangle is the following:

Rectangle makeRectangle (Point lowerLeft, Point upperRight) {
      
      Rectangle r;

      r.pt1 = lowerLeft;
      r.pt2 = upperRight;
      return r;
}

and Point is the following:

Point makePoint(int x, int y) {
    Point p;
    p.x = x;
    p.y = y;
    return p;
}


And i want the know how to make:

Rectangle intersection(Rectangle r1, Rectangle r2)  

this should return the intersection of the 2 rectangles
anyone can help me plz?

i am not good in math
Start Free Trial
[+][-]09.25.2004 at 09:14AM PDT, ID: 12150960

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.25.2004 at 09:15AM PDT, ID: 12150966

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: C Programming Language
Tags: intersection, rectangle
Sign Up Now!
Solution Provided By: keteracel
Participating Experts: 4
Solution Grade: A
 
 
[+][-]09.25.2004 at 09:35AM PDT, ID: 12151045

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.25.2004 at 09:36AM PDT, ID: 12151048

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.25.2004 at 09:41AM PDT, ID: 12151069

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.25.2004 at 10:07AM PDT, ID: 12151165

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.25.2004 at 10:10AM PDT, ID: 12151177

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.25.2004 at 10:34AM PDT, ID: 12151272

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.18.2005 at 06:55AM PDT, ID: 15107418

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32