region: add far corner query
This commit is contained in:
parent
8ea1a04f57
commit
e1ebacb16a
@ -109,6 +109,15 @@ util::region<T>::base (void) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
template <typename T>
|
||||||
|
util::point<2,T>
|
||||||
|
util::region<T>::far (void) const
|
||||||
|
{
|
||||||
|
return { x + w, y + h };
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
template <typename T>
|
template <typename T>
|
||||||
util::point<2,T>
|
util::point<2,T>
|
||||||
|
@ -54,6 +54,7 @@ namespace util {
|
|||||||
bool empty (void) const;
|
bool empty (void) const;
|
||||||
|
|
||||||
point<2,T> base (void) const;
|
point<2,T> base (void) const;
|
||||||
|
point<2,T> far (void) const;
|
||||||
point<2,T> centre (void) const;
|
point<2,T> centre (void) const;
|
||||||
point<2,T> closest (point<2,T>) const;
|
point<2,T> closest (point<2,T>) const;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user