point: add min/max convenience methods
these create the smallest/largest expressible coordinates
This commit is contained in:
parent
bdd2e06044
commit
1f337ef964
21
point.hpp
21
point.hpp
@ -37,8 +37,27 @@ namespace util {
|
||||
|
||||
template <size_t D> point<D,T> homog (void) const;
|
||||
|
||||
static constexpr point<S,T> origin (void);
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
static constexpr
|
||||
auto min (void)
|
||||
{
|
||||
return point { std::numeric_limits<T>::lowest () };
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
static constexpr
|
||||
auto max (void)
|
||||
{
|
||||
return point { std::numeric_limits<T>::max () };
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
static constexpr
|
||||
point<S,T> origin (void);
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
void sanity (void) const;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user