From 0c26b6cb5cb03609ffc66efe1ec9214260abd683 Mon Sep 17 00:00:00 2001 From: Jonathan Youett <youett@math.fu-berlin.de> Date: Fri, 24 Nov 2017 15:40:36 +0100 Subject: [PATCH] Fix method 'difference' When switching to the double covered quaternion pair, the corresponding distance was not computed correctly --- dune/gfe/rotation.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dune/gfe/rotation.hh b/dune/gfe/rotation.hh index b4e2fce9..42d6c24d 100644 --- a/dune/gfe/rotation.hh +++ b/dune/gfe/rotation.hh @@ -605,7 +605,7 @@ public: // Make sure we do the right thing if a and b are not in the same sheet // of the double covering of the unit quaternions over SO(3) if (dist>=M_PI) { - dist -= M_PI; + dist = 2*M_PI - dist; diff *= -1; } -- GitLab