Skip to content
Snippets Groups Projects
Commit bb0ef0a3 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Replaced M_PI by std::numbers::pi

parent fd27e4e4
No related branches found
No related tags found
1 merge request!320M214003/develop
Pipeline #96532 passed
......@@ -8,7 +8,6 @@
#define REMAP_H
#include <cstdint>
#include <cmath>
#include "varray.h"
#include "remap_vars.h"
......@@ -18,16 +17,9 @@
#include "point.h"
#include "mpim_grid/grid_healpix.h"
#ifndef M_PI
#define M_PI 3.14159265358979323846264338327950288
#endif
constexpr double PI = M_PI;
constexpr double PI = std::numbers::pi;
constexpr double PI2 = (2.0 * PI);
constexpr double PIH = (0.5 * PI);
constexpr float PI_f = PI;
constexpr float PI2_f = PI2;
constexpr float PIH_f = PIH;
constexpr double TINY = 1.e-14;
......
......@@ -804,7 +804,7 @@ remove_missing_weights(const Varray<T> &srcArray, T missval, size_t numWeights,
static double
sphere_segment_area(double latInRadian)
{
return 2.0 * M_PI * (1.0 - std::cos(M_PI * 0.5 - latInRadian));
return 2.0 * std::numbers::pi * (1.0 - std::cos(std::numbers::pi * 0.5 - latInRadian));
}
static double
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment