diff --git a/dune/gfe/rotation.hh b/dune/gfe/rotation.hh index 2ce7cfbd48260f2ed5200799b55b210d485e0a19..9a2d4b989ee67c5f0b6f8f672fd4584131ca54c9 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.