diff --git a/vector.cpp b/vector.cpp index 407a47f5..57a82877 100644 --- a/vector.cpp +++ b/vector.cpp @@ -181,6 +181,11 @@ util::vector::is_zero (void) const //----------------------------------------------------------------------------- +template +const util::vector +util::vector::UNIT (T{1}); + + template const util::vector util::vector::ZERO (T{0}); diff --git a/vector.hpp b/vector.hpp index d85e570e..20c405a3 100644 --- a/vector.hpp +++ b/vector.hpp @@ -43,6 +43,7 @@ namespace util { vector normalised [[gnu::warn_unused_result]] (void) const; // constants + static const vector UNIT; static const vector ZERO; void sanity (void) const;