Add helpers based on Slice: row(), col(), xy()

This commit is contained in:
Julian Kent
2019-09-16 16:11:08 +02:00
parent 82d565f4d9
commit b817e8677d
5 changed files with 102 additions and 13 deletions
+10
View File
@@ -109,6 +109,16 @@ public:
return unit();
}
const Slice<Type, 2, 1, 3, 1> xy() const
{
return Slice<Type, 2, 1, 3, 1>(0, 0, this);
}
Slice<Type, 2, 1, 3, 1> xy()
{
return Slice<Type, 2, 1, 3, 1>(0, 0, this);
}
Dcm<Type> hat() const { // inverse to Dcm.vee() operation
const Vector3 &v(*this);