Add aspect query for extent
This commit is contained in:
parent
3c0368e74c
commit
932f7a4ec3
@ -47,6 +47,12 @@ extent<T>::area (void) const
|
|||||||
{ return width * height; }
|
{ return width * height; }
|
||||||
|
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
double
|
||||||
|
extent<T>::aspect (void) const
|
||||||
|
{ return static_cast<double> (width) / height; }
|
||||||
|
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
bool
|
bool
|
||||||
extent<T>::empty (void) const
|
extent<T>::empty (void) const
|
||||||
|
@ -33,6 +33,8 @@ namespace util {
|
|||||||
T area (void) const;
|
T area (void) const;
|
||||||
T diameter (void) const;
|
T diameter (void) const;
|
||||||
|
|
||||||
|
double aspect (void) const;
|
||||||
|
|
||||||
bool empty (void) const;
|
bool empty (void) const;
|
||||||
|
|
||||||
bool operator ==(const extent& rhs) const;
|
bool operator ==(const extent& rhs) const;
|
||||||
|
Loading…
Reference in New Issue
Block a user