diff --git a/dune/gfe/quaternion.hh b/dune/gfe/quaternion.hh index e21eb2be6b5abe0ee4d2823a2271ab0895f5bb2f..712b2a549bd5b4389aa6deba6586580e6801fecf 100644 --- a/dune/gfe/quaternion.hh +++ b/dune/gfe/quaternion.hh @@ -146,6 +146,14 @@ public: (*this) /= this->two_norm2(); } + + /** \brief Yield the inverse quaternion */ + Quaternion<T> inverse() const { + + Quaternion<T> result = *this; + result.invert(); + return result; + } /** \brief Create three vectors which form an orthonormal basis of \mathbb{H} together with this one.