From be51a55b6dab82756341bd4eec43aa958d946a74 Mon Sep 17 00:00:00 2001
From: Oliver Sander <sander@igpm.rwth-aachen.de>
Date: Sun, 1 Jan 2012 16:32:30 +0000
Subject: [PATCH] fix distance method when on two different sheets of the
 double covering

[[Imported from SVN: r8329]]
---
 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 2ce7cfbd..9a2d4b98 100644
--- a/dune/gfe/rotation.hh
+++ b/dune/gfe/rotation.hh
@@ -554,7 +554,7 @@ public:
         T dist = 2*std::acos( std::min(diff[3],1.0) );
 
         if (dist>=M_PI)
-            diff *= -1;
+            return 2*M_PI - dist;
  
         // Compute the geodesical distance between a and b on SO(3)
         // Due to numerical dirt, diff[3] may be larger than 1. 
-- 
GitLab