summaryrefslogtreecommitdiff
path: root/boost/math/special_functions/spherical_harmonic.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/math/special_functions/spherical_harmonic.hpp')
-rw-r--r--boost/math/special_functions/spherical_harmonic.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/boost/math/special_functions/spherical_harmonic.hpp b/boost/math/special_functions/spherical_harmonic.hpp
index 33b2574480..00a6ade0d2 100644
--- a/boost/math/special_functions/spherical_harmonic.hpp
+++ b/boost/math/special_functions/spherical_harmonic.hpp
@@ -11,6 +11,7 @@
#pragma once
#endif
+#include <boost/math/special_functions/math_fwd.hpp>
#include <boost/math/special_functions/legendre.hpp>
#include <boost/math/tools/workaround.hpp>
#include <complex>
@@ -119,7 +120,7 @@ std::complex<T> spherical_harmonic(unsigned n, int m, U theta, U phi, const Poli
if(m&1)
{
// Check phase if theta is outside [0, PI]:
- U mod = boost::math::tools::fmod_workaround(theta, 2 * constants::pi<U>());
+ U mod = boost::math::tools::fmod_workaround(theta, U(2 * constants::pi<U>()));
if(mod < 0)
mod += 2 * constants::pi<U>();
if(mod > constants::pi<U>())