Replace pow with sqrt

This commit is contained in:
Julian Kent
2019-09-09 02:18:10 -07:00
committed by Lorenz Meier
parent 22bf63cb71
commit 03ffd696a6
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -66,7 +66,7 @@ public:
Type norm() const {
const Vector &a(*this);
return Type(sqrt(a.dot(a)));
return Type(::sqrt(a.dot(a)));
}
Type norm_squared() const {
@@ -98,11 +98,11 @@ public:
return unit();
}
Vector pow(Type v) const {
Vector sqrt() const {
const Vector &a(*this);
Vector r;
for (size_t i = 0; i<M; i++) {
r(i) = Type(::pow(a(i), v));
r(i) = Type(::sqrt(a(i)));
}
return r;
}