From f6744282d107e33c5ee3afce9abe36bd1ad40f9b Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Fri, 14 Jan 2011 10:14:22 +0000 Subject: [PATCH] introduce const method 'inverse' for convenience [[Imported from SVN: r6740]] --- dune/gfe/quaternion.hh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dune/gfe/quaternion.hh b/dune/gfe/quaternion.hh index e21eb2be..712b2a54 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. -- GitLab