From: Wolfgang Bangerth Date: Tue, 3 Jun 2025 13:31:16 +0000 (-0600) Subject: Avoid the use of the M_PI macro. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ed3545a324042f1486b35cb698bd78636276cbf;p=dealii.git Avoid the use of the M_PI macro. --- diff --git a/examples/step-81/step-81.cc b/examples/step-81/step-81.cc index 9e4eaa13f1..0ddd7cc557 100644 --- a/examples/step-81/step-81.cc +++ b/examples/step-81/step-81.cc @@ -224,9 +224,10 @@ namespace Step81 const auto distance = (dipole_position - point).norm() / dipole_radius; if (distance > 1.) return J_a; - double scale = std::cos(distance * M_PI / 2.) * - std::cos(distance * M_PI / 2.) / (M_PI / 2. - 2. / M_PI) / - dipole_radius / dipole_radius; + double scale = std::cos(distance * numbers::PI / 2.) * + std::cos(distance * numbers::PI / 2.) / + (numbers::PI / 2. - 2. / numbers::PI) / dipole_radius / + dipole_radius; J_a = dipole_strength * dipole_orientation * scale; return J_a; }