ATLAS Offline Software
Loading...
Searching...
No Matches
proxim.h File Reference
#include <math.h>
#include <numbers>
#include "CxxUtils/AthUnlikelyMacros.h"
Include dependency graph for proxim.h:

Go to the source code of this file.

Functions

double proxim (double b, double a)

Function Documentation

◆ proxim()

double proxim ( double b,
double a )
inline

Definition at line 17 of file proxim.h.

18{
19 using std::numbers::pi;
20 const double aplus = a + pi;
21 const double aminus = a - pi;
22 if (ATH_UNLIKELY(b > aplus)) {
23 do {
24 b -= 2*pi;
25 } while(b > aplus);
26 }
27 else if (ATH_UNLIKELY(b < aminus)) {
28 do {
29 b += 2*pi;
30 } while(b < aminus);
31 }
32 return b;
33}
#define ATH_UNLIKELY(x)
static Double_t a
#define pi