Replace rounding using int(x+0.5) with roundToInt
[alexxy/gromacs.git] / src / gromacs / mdlib / coupling.cpp
index 8d9313a8b3247d53cec06e14da64b0d3ffa2d826..27304afeed903effacc4d46fc1fa46d5c8a11349 100644 (file)
@@ -1448,7 +1448,7 @@ static real vrescale_sumnoises(real                            nn,
         int  nn_int, i;
         real gauss;
 
-        nn_int = static_cast<int>(nn + 0.5);
+        nn_int = gmx::roundToInt(nn);
 
         if (nn - nn_int < -ndeg_tol || nn - nn_int > ndeg_tol)
         {