LSSTApplications  11.0-24-g0a022a1,15.0+13,15.0+9,15.0-1-g19261fa+5,15.0-1-g1eca518+15,15.0-1-g60afb23+12,15.0-1-g615e0bb+4,15.0-1-g6668b0b+5,15.0-1-g788a293+12,15.0-1-ga91101e+12,15.0-1-gae1598d+8,15.0-1-gc45031d+15,15.0-1-gd076f1f+12,15.0-1-gdf18595+2,15.0-1-gf4f1c34+8,15.0-2-g100d730+5,15.0-2-g18f3f21+5,15.0-2-g35685a8+6,15.0-2-gf38729e+5,15.0-21-g91b8abf62,15.0-3-g150fc43+14,15.0-3-g6f085af+5,15.0-3-g707930d,15.0-3-g9103c06+8,15.0-3-ga03b4ca+16,15.0-3-gaec6799+5,15.0-3-gb7a597c+12,15.0-3-ge6a6747+5,15.0-4-g45f767a+8,15.0-4-g654b129+10,15.0-4-gf5d1e39,15.0-4-gff20472+15,15.0-5-ga70c291+5,15.0-6-g9a9df217+5,15.0-7-gab4c137+6,15.0-7-gab79a70c+4
LSSTDataManagementBasePackage
Classes | Namespaces | Macros | Functions | Variables
Angle.h File Reference
#include <iostream>
#include <type_traits>
#include <cmath>
#include "boost/math/constants/constants.hpp"

Go to the source code of this file.

Classes

class  lsst::afw::geom::AngleUnit
 A class used to convert scalar POD types such as double to Angle. More...
 
class  lsst::afw::geom::Angle
 A class representing an angle. More...
 

Namespaces

 lsst
 A base class for image defects.
 
 lsst::afw
 
 lsst::afw::geom
 

Macros

#define ANGLE_OPUP_TYPE(OP, TYPE)
 
#define ANGLE_COMP(OP)   constexpr bool operator OP(const Angle& rhs) const noexcept { return _val OP rhs._val; }
 
#define ANGLE_OP(OP)
 
#define ANGLE_OP_TYPE(OP, TYPE)
 

Functions

constexpr double lsst::afw::geom::degToRad (double x) noexcept
 
constexpr double lsst::afw::geom::radToDeg (double x) noexcept
 
constexpr double lsst::afw::geom::radToArcsec (double x) noexcept
 
constexpr double lsst::afw::geom::radToMas (double x) noexcept
 
constexpr double lsst::afw::geom::arcsecToRad (double x) noexcept
 
constexpr double lsst::afw::geom::masToRad (double x) noexcept
 
constexpr Angle lsst::afw::geom::operator+ (Angle a, Angle d) noexcept
 Sum of two angles. More...
 
constexpr Angle lsst::afw::geom::operator- (Angle a, Angle d) noexcept
 Difference of two angles. More...
 
constexpr Angle lsst::afw::geom::operator* (Angle a, Angle d) noexcept
 Product of two angles. More...
 
constexpr Angle lsst::afw::geom::operator- (Angle angle)
 An angle in the opposite sense. More...
 
constexpr Angle lsst::afw::geom::operator/ (Angle a, int d) noexcept
 Ratio of an angle and a scalar. More...
 
constexpr Angle lsst::afw::geom::operator/ (Angle a, double d) noexcept
 Ratio of an angle and a scalar. More...
 
template<typename T >
constexpr double lsst::afw::geom::operator/ (T const lhs, Angle rhs) noexcept=delete
 
std::ostreamlsst::afw::geom::operator<< (std::ostream &s, Angle a)
 Print an Angle to a stream. More...
 
template<typename T >
constexpr bool lsst::afw::geom::isAngle (T) noexcept
 Allow a user to check if they have an angle. More...
 
template<typename T >
constexpr Angle lsst::afw::geom::operator* (T lhs, AngleUnit rhs) noexcept
 Use AngleUnit to convert a POD (e.g. int, double) to an Angle; e.g. 180*degrees. More...
 
constexpr Angle lsst::afw::geom::operator* (Angle a, double d) noexcept
 Product of an angle and a scalar. More...
 
constexpr Angle lsst::afw::geom::operator* (double d, Angle a) noexcept
 Product of an angle and a scalar. More...
 
constexpr Angle lsst::afw::geom::operator* (Angle a, int d) noexcept
 Product of an angle and a scalar. More...
 
constexpr Angle lsst::afw::geom::operator* (int d, Angle a) noexcept
 Product of an angle and a scalar. More...
 

Variables

double constexpr lsst::afw::geom::PI = boost::math::constants::pi<double>()
 The ratio of a circle's circumference to diameter. More...
 
double constexpr lsst::afw::geom::TWOPI = boost::math::constants::pi<double>() * 2.0
 
double constexpr lsst::afw::geom::HALFPI = boost::math::constants::pi<double>() * 0.5
 
double constexpr lsst::afw::geom::ONE_OVER_PI = 1.0 / boost::math::constants::pi<double>()
 
double const lsst::afw::geom::SQRTPI = sqrt(boost::math::constants::pi<double>())
 
double const lsst::afw::geom::INVSQRTPI = 1.0 / sqrt(boost::math::constants::pi<double>())
 
double constexpr lsst::afw::geom::ROOT2 = boost::math::constants::root_two<double>()
 
AngleUnit constexpr lsst::afw::geom::radians = AngleUnit(1.0)
 constant with units of radians More...
 
AngleUnit constexpr lsst::afw::geom::degrees = AngleUnit(PI / 180.0)
 constant with units of degrees More...
 
AngleUnit constexpr lsst::afw::geom::hours = AngleUnit(PI * 15.0 / 180.0)
 constant with units of hours More...
 
AngleUnit constexpr lsst::afw::geom::arcminutes = AngleUnit(PI / 60 / 180.0)
 constant with units of arcminutes More...
 
AngleUnit constexpr lsst::afw::geom::arcseconds = AngleUnit(PI / 180.0 / 3600.0)
 constant with units of arcseconds More...
 

Macro Definition Documentation

◆ ANGLE_COMP

#define ANGLE_COMP (   OP)    constexpr bool operator OP(const Angle& rhs) const noexcept { return _val OP rhs._val; }

Definition at line 231 of file Angle.h.

◆ ANGLE_OP

#define ANGLE_OP (   OP)
Value:
inline constexpr Angle operator OP(Angle a, Angle d) noexcept { \
return Angle(static_cast<double>(a) OP static_cast<double>(d)); \
}
lsst::afw::geom::Angle Angle
Definition: misc.h:33
table::Key< int > a

Definition at line 256 of file Angle.h.

◆ ANGLE_OP_TYPE

#define ANGLE_OP_TYPE (   OP,
  TYPE 
)
Value:
inline constexpr Angle operator OP(Angle a, TYPE d) noexcept { \
return Angle(static_cast<double>(a) OP d); \
} \
\
inline constexpr Angle operator OP(TYPE d, Angle a) noexcept { \
return Angle(d OP static_cast<double>(a)); \
}
lsst::afw::geom::Angle Angle
Definition: misc.h:33
table::Key< int > a

Definition at line 263 of file Angle.h.

◆ ANGLE_OPUP_TYPE

#define ANGLE_OPUP_TYPE (   OP,
  TYPE 
)
Value:
Angle& operator OP(TYPE const& d) noexcept { \
_val OP d; \
return *this; \
}
lsst::afw::geom::Angle Angle
Definition: misc.h:33

Definition at line 207 of file Angle.h.