2
0
mirror of https://github.com/boostorg/math.git synced 2026-01-19 04:22:09 +00:00

Correct use of M_PI - it's a Unix-ism.

This commit is contained in:
jzmaddock
2019-01-20 08:38:16 +00:00
committed by GitHub
parent 64bc711c87
commit b866276e2a

View File

@@ -20,7 +20,7 @@ int main()
// The Archimedean spiral is given by r = a*theta. We have set a = 1.
std::vector<std::array<double, 2>> spiral_points(500);
double theta_max = M_PI;
double theta_max = boost::math::constants::pi<double>();
for (size_t i = 0; i < spiral_points.size(); ++i)
{
double theta = ((double) i/ (double) spiral_points.size())*theta_max;