diff options
Diffstat (limited to 'lib/vector.h')
-rw-r--r-- | lib/vector.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/vector.h b/lib/vector.h index d5ced03..beee1a7 100644 --- a/lib/vector.h +++ b/lib/vector.h @@ -81,10 +81,10 @@ class vector_t : public std::array<T, q> { }; -template<q_t q> -double norm_squared(vector_t<q, double> v) { +template<q_t q, class T> +double norm_squared(vector_t<q, T> v) { double tmp = 0; - for (double &x : v) { + for (T &x : v) { tmp += pow(x, 2); } |