Go to the documentation of this file.
23 #ifndef LSST_SPHGEOM_NORMALIZEDANGLE_H_
24 #define LSST_SPHGEOM_NORMALIZEDANGLE_H_
87 _a =
Angle(std::fmod(a, 2.0 * PI) + 2.0 * PI);
88 }
else if (a > 2 * PI) {
89 _a =
Angle(std::fmod(a, 2.0 * PI));
106 operator Angle const & ()
const {
return _a; }
109 bool operator==(
Angle const & a)
const {
return _a == a; }
110 bool operator!=(Angle
const & a)
const {
return _a != a; }
111 bool operator<(Angle
const & a)
const {
return _a < a; }
112 bool operator>(Angle
const & a)
const {
return _a > a; }
113 bool operator<=(Angle
const & a)
const {
return _a <= a; }
114 bool operator>=(Angle
const & a)
const {
return _a >= a; }
117 Angle operator-()
const {
return Angle(-_a); }
118 Angle operator+(Angle
const & a)
const {
return _a + a; }
119 Angle operator-(Angle
const & a)
const {
return _a - a; }
120 Angle operator*(
double a)
const {
return _a * a; }
121 Angle operator/(
double a)
const {
return _a / a; }
122 double operator/(Angle
const & a)
const {
return _a / a; }
142 x._a =
Angle((d < 0.0) ? 2.0 * PI + d : d);
150 inline NormalizedAngle
const & abs(NormalizedAngle
const & a) {
return a; }
154 #endif // LSST_SPHGEOM_NORMALIZEDANGLE_H_
double asRadians() const
asRadians returns the value of this angle in units of radians.
Definition: NormalizedAngle.h:128
NormalizedAngle(Angle const &a)
This constructor creates a normalized copy of a.
Definition: NormalizedAngle.h:77
double asRadians() const
asRadians returns the value of this angle in units of radians.
Definition: Angle.h:85
bool isNan() const
isNan returns true if the angle value is NaN.
Definition: Angle.h:91
bool isNan() const
isNan returns true if the angle value is NaN.
Definition: NormalizedAngle.h:131
static NormalizedAngle center(NormalizedAngle const &a, NormalizedAngle const &b)
Definition: NormalizedAngle.cc:45
NormalizedAngle getAngleTo(NormalizedAngle const &a) const
Definition: NormalizedAngle.h:139
Vector3d is a vector in ℝ³ with components stored in double precision.
Definition: Vector3d.h:44
double asDegrees() const
asDegrees returns the value of this angle in units of degrees.
Definition: NormalizedAngle.h:125
NormalizedAngle()
This constructor creates a NormalizedAngle with a value of zero.
Definition: NormalizedAngle.h:71
static NormalizedAngle between(NormalizedAngle const &a, NormalizedAngle const &b)
Definition: NormalizedAngle.cc:35
NormalizedAngle(double a)
Definition: NormalizedAngle.h:83
This file declares a class for representing angles.
double asDegrees() const
asDegrees returns the value of this angle in units of degrees.
Definition: Angle.h:82
NormalizedAngle(NormalizedAngle const &a)
This constructor creates a copy of a.
Definition: NormalizedAngle.h:74
Definition: NormalizedAngle.h:41