coord: use self-dot-product for norm2
This commit is contained in:
parent
c91e1d29c3
commit
3dd80be05a
@ -448,10 +448,7 @@ namespace util {
|
|||||||
T
|
T
|
||||||
norm2 (const K<S,T> &k)
|
norm2 (const K<S,T> &k)
|
||||||
{
|
{
|
||||||
T sum = T{0};
|
return dot (k, k);
|
||||||
for (auto &t: k)
|
|
||||||
sum += t * t;
|
|
||||||
return sum;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user