extent: add scalar variant of expanded

This commit is contained in:
Danny Robson 2015-02-12 17:40:47 +11:00
parent 7b3ea29856
commit 23ffd18acb
2 changed files with 10 additions and 1 deletions

View File

@ -81,9 +81,17 @@ extent<T>::expanded (util::vector<2,T> size) const
}
//-----------------------------------------------------------------------------
template <typename T>
extent<T>
extent<T>::expanded (T t) const
{
return expanded (util::vector<2,T> {t});
}
///////////////////////////////////////////////////////////////////////////////
template <typename T>
float
extent<T>::aspect (void) const
{

View File

@ -41,6 +41,7 @@ namespace util {
T diameter (void) const;
extent<T> expanded (util::vector<2,T>) const;
extent<T> expanded (T) const;
float aspect (void) const;