Commit 47514d18 authored by Davis King's avatar Davis King

Made the centered_rect() spec more clear.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402977
parent aba529b3
...@@ -417,6 +417,7 @@ namespace dlib ...@@ -417,6 +417,7 @@ namespace dlib
- else - else
- R.width() == width - R.width() == width
- R.height() == height - R.height() == height
- R.tl_corner() == point(p.x()-width/2, p.y()-height/2)
- The center of R is a the point p - The center of R is a the point p
!*/ !*/
...@@ -437,6 +438,7 @@ namespace dlib ...@@ -437,6 +438,7 @@ namespace dlib
- else - else
- R.width() == width - R.width() == width
- R.height() == height - R.height() == height
- R.tl_corner() == point(x-width/2, y-height/2)
- The center of R is a the point (x,y) - The center of R is a the point (x,y)
!*/ !*/
...@@ -449,14 +451,9 @@ namespace dlib ...@@ -449,14 +451,9 @@ namespace dlib
); );
/*! /*!
ensures ensures
- returns a rectangle R such that: - returns centered_rect( (rect.tl_corner() + rect.br_corner())/2, width, height)
- if (width == 0 || height == 0) (i.e. returns a rectangle centered on rect but with the given width
- R.width() == 0 and height)
- R.height() == 0
- else
- R.width() == width
- R.height() == height
- The center of R is at the center of 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