More features: longerThan, norm, copyTo and slice on a Slice (#97)

* Allow slices of slices, add longerThan to Vector/Slice
This commit is contained in:
Julian Kent
2019-10-03 13:47:36 +02:00
committed by GitHub
parent 740324cf1e
commit 92d1c8761e
7 changed files with 121 additions and 8 deletions
+5
View File
@@ -104,6 +104,11 @@ public:
return unit();
}
bool longerThan(Type testVal)
{
return norm_squared() > testVal*testVal;
}
Vector sqrt() const {
const Vector &a(*this);
Vector r;