diff --git a/dune/gfe/rotation.hh b/dune/gfe/rotation.hh
index c8dfe19429c8a6b2589821db2fbb0945b840c973..e83e17800b5e2d2fc67a32dc5a7304fdbc0f58c0 100644
--- a/dune/gfe/rotation.hh
+++ b/dune/gfe/rotation.hh
@@ -574,7 +574,7 @@ public:
         T sp = a.globalCoordinates() * b.globalCoordinates();
 
         // Scalar product may be larger than 1.0, due to numerical dirt
-        T dist = 2*std::acos( std::min(sp,1.0) );
+        T dist = 2*std::acos( std::min(sp,T(1.0)) );
 
         // 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)