Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
feeb9fae
Commit
feeb9fae
authored
May 18, 2013
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added global function versions of rectangle::intersect() and rectangle::area()
to make the overall rectangle API more uniform.
parent
d204408f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
0 deletions
+35
-0
rectangle.h
dlib/geometry/rectangle.h
+13
-0
rectangle_abstract.h
dlib/geometry/rectangle_abstract.h
+22
-0
No files found.
dlib/geometry/rectangle.h
View file @
feeb9fae
...
...
@@ -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
(
...
...
dlib/geometry/rectangle_abstract.h
View file @
feeb9fae
...
...
@@ -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
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment