vector: add constant unit vector
This commit is contained in:
parent
13ea2bbdf5
commit
f87481c5e0
@ -181,6 +181,11 @@ util::vector<S,T>::is_zero (void) const
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
template <size_t S, typename T>
|
||||
const util::vector<S,T>
|
||||
util::vector<S,T>::UNIT (T{1});
|
||||
|
||||
|
||||
template <size_t S, typename T>
|
||||
const util::vector<S,T>
|
||||
util::vector<S,T>::ZERO (T{0});
|
||||
|
@ -43,6 +43,7 @@ namespace util {
|
||||
vector<S,T> normalised [[gnu::warn_unused_result]] (void) const;
|
||||
|
||||
// constants
|
||||
static const vector<S,T> UNIT;
|
||||
static const vector<S,T> ZERO;
|
||||
|
||||
void sanity (void) const;
|
||||
|
Loading…
Reference in New Issue
Block a user