- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrectangle_intersection.h
More file actions
Latest commit
31 lines (27 loc) · 723 Bytes
/
Copy pathrectangle_intersection.h
File metadata and controls
31 lines (27 loc) · 723 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef CPP_ALGORITHM_RECTANGLE_INTERSECTION_H
#defineCPP_ALGORITHM_RECTANGLE_INTERSECTION_H
namespaceRectangleIntersection
{
structRectangle
{
int X;
int Y;
int Width;
int Height;
};
/**
* \brief Check if two rectangles intersect.
* \param r1 rectangle 1
* \param r2 rectangle 2
* \return result
*/
autoIntersectRectangle(const Rectangle& r1, const Rectangle& r2) -> Rectangle;
/**
* \brief Check the intersection of two rectangles.
* \param r1 rectangle 1
* \param r2 rectangle 2
* \return Whether two rectangles intersect
*/
autoIsIntersect(const Rectangle& r1, const Rectangle& r2) -> bool;
}
#endif