 |
Belle II Software
release-05-01-25
|
19 namespace TrackFindingCDC {
29 static double average(
const double angle1,
double angle2)
37 if (angle > M_PI)
return angle - 2 * M_PI;
38 if (angle < -M_PI)
return angle + 2 * M_PI;
45 if (angle > M_PI) angle -= 2 * M_PI;
46 if (angle < -M_PI) angle += 2 * M_PI;
52 return std::remainder(angle, 2 * M_PI);
56 static double reversed(
const double angle)
58 return angle > 0 ? angle - M_PI : angle + M_PI;
static void normalise(double &angle)
Normalise an angle inplace to lie in the range from [-pi, pi].
static double fullNormalised(const double angle)
Normalise an angle to lie in the range from [-pi, pi].
Abstract base class for different kinds of events.
static double reversed(const double angle)
Get the angle that point in the opposite direction.
static double average(const double angle1, double angle2)
Combines two angluar values to the one that lies half way between them on the short arc.
static double normalised(const double angle)
Normalise an angle to lie in the range from [-pi, pi].