*
* 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.
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);
}