Commit feeb9fae authored by Davis King's avatar Davis King

Added global function versions of rectangle::intersect() and rectangle::area()

to make the overall rectangle API more uniform.
parent d204408f
......@@ -361,6 +361,19 @@ namespace dlib
return result;
}
// ----------------------------------------------------------------------------------------
inline rectangle intersect (
const rectangle& a,
const rectangle& b
) { return a.intersect(b); }
// ----------------------------------------------------------------------------------------
inline unsigned long area (
const rectangle& a
) { return a.area(); }
// ----------------------------------------------------------------------------------------
inline point center (
......
......@@ -477,6 +477,28 @@ namespace dlib
and height)
!*/
// ----------------------------------------------------------------------------------------
inline rectangle intersect (
const rectangle& a,
const rectangle& b
);
/*!
ensures
- returns a.intersect(b)
(i.e. returns a rectangle representing the intersection of a and b)
!*/
// ----------------------------------------------------------------------------------------
inline unsigned long area (
const rectangle& a
);
/*!
ensures
- returns a.area()
!*/
// ----------------------------------------------------------------------------------------
inline const rectangle shrink_rect (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment