23 #ifndef LSST_SPHGEOM_NORMALIZEDANGLE_H_ 24 #define LSST_SPHGEOM_NORMALIZEDANGLE_H_ 88 }
else if (a > 2 *
PI) {
106 operator Angle const & ()
const {
return _a; }
142 x._a =
Angle((d < 0.0) ? 2.0 *
PI + d : d);
154 #endif // LSST_SPHGEOM_NORMALIZEDANGLE_H_ Angle abs(Angle const &a)
Angle operator/(double a) const
static NormalizedAngle center(NormalizedAngle const &a, NormalizedAngle const &b)
For two normalized angles a and b, center(a, b) returns the angle m such that a.getAngleTo(m) is equa...
bool operator!=(Angle const &a) const
NormalizedAngle is an angle that lies in the range [0, 2π), with one exception - a NormalizedAngle ca...
bool isNan() const
isNan returns true if the angle value is NaN.
double asRadians() const
asRadians returns the value of this angle in units of radians.
NormalizedAngle()
This constructor creates a NormalizedAngle with a value of zero.
Vector3d is a vector in ℝ³ with components stored in double precision.
NormalizedAngle getAngleTo(NormalizedAngle const &a) const
getAngleTo computes the angle α ∈ [0, 2π) such that adding α to this angle and then normalizing the ...
static NormalizedAngle fromDegrees(double a)
NormalizedAngle(Angle const &a)
This constructor creates a normalized copy of a.
bool operator<=(Angle const &a) const
This file declares a class for representing angles.
double asDegrees() const
asDegrees returns the value of this angle in units of degrees.
bool isNan() const
isNan returns true if the angle value is NaN.
A base class for image defects.
bool operator==(Angle const &a) const
double asRadians() const
asRadians returns the value of this angle in units of radians.
double asDegrees() const
asDegrees returns the value of this angle in units of degrees.
static NormalizedAngle nan()
static NormalizedAngle fromRadians(double a)
static NormalizedAngle between(NormalizedAngle const &a, NormalizedAngle const &b)
For two angles a and b, between(a, b) returns the smaller of a.getAngleTo(b) and b.getAngleTo(a).
double operator/(Angle const &a) const
NormalizedAngle(double a)
This constructor creates a NormalizedAngle with the given value in radians, normalized to be in the r...
bool operator>=(Angle const &a) const
Angle represents an angle in radians.
LonLat represents a spherical coordinate (longitude/latitude angle) pair.
Angle operator+(Angle const &a) const
bool operator<(Angle const &a) const
Angle operator*(double a) const
NormalizedAngle(NormalizedAngle const &a)
This constructor creates a copy of a.
Angle operator-(Angle const &a) const
bool operator>(Angle const &a) const
constexpr double RAD_PER_DEG