Add aspect query for extent

This commit is contained in:
Danny Robson 2012-06-04 14:51:25 +10:00
parent 3c0368e74c
commit 932f7a4ec3
2 changed files with 8 additions and 0 deletions

View File

@ -47,6 +47,12 @@ extent<T>::area (void) const
{ return width * height; }
template <typename T>
double
extent<T>::aspect (void) const
{ return static_cast<double> (width) / height; }
template <typename T>
bool
extent<T>::empty (void) const

View File

@ -33,6 +33,8 @@ namespace util {
T area (void) const;
T diameter (void) const;
double aspect (void) const;
bool empty (void) const;
bool operator ==(const extent& rhs) const;