Apply clang-format to source tree
[alexxy/gromacs.git] / src / gromacs / correlationfunctions / polynomials.cpp
index 18765ab1ff7f8c37c3daee3c9a685cf892314b09..a357f30022dd31bccc87f5adef12c15e71eb69e0 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -55,31 +55,26 @@ real LegendreP(real x, unsigned int m)
 
     switch (m)
     {
-        case 0:
-            polynomial = 1.0;
-            break;
-        case 1:
-            polynomial = x;
-            break;
+        case 0: polynomial = 1.0; break;
+        case 1: polynomial = x; break;
         case 2:
-            x2         = x*x;
-            polynomial = 1.5*x2 - 0.5;
+            x2         = x * x;
+            polynomial = 1.5 * x2 - 0.5;
             break;
         case 3:
-            x2         = x*x;
-            polynomial = (5*x2*x - 3*x )* 0.5;
+            x2         = x * x;
+            polynomial = (5 * x2 * x - 3 * x) * 0.5;
             break;
         case 4:
-            x2         = x*x;
-            polynomial = (35*x2*x2 - 30*x2 + 3)/8;
+            x2         = x * x;
+            polynomial = (35 * x2 * x2 - 30 * x2 + 3) / 8;
             break;
         case 5:
-            x2         = x*x;
-            x3         = x2*x;
-            polynomial = (63*x3*x2 - 70*x3 + 15*x)/8;
+            x2         = x * x;
+            x3         = x2 * x;
+            polynomial = (63 * x3 * x2 - 70 * x3 + 15 * x) / 8;
             break;
-        default:
-            gmx_fatal(FARGS, "Legendre polynomials of order %u are not supported", m);
+        default: gmx_fatal(FARGS, "Legendre polynomials of order %u are not supported", m);
     }
     return (polynomial);
 }