LSST Applications 27.0.0,g0265f82a02+469cd937ee,g02d81e74bb+21ad69e7e1,g1470d8bcf6+cbe83ee85a,g2079a07aa2+e67c6346a6,g212a7c68fe+04a9158687,g2305ad1205+94392ce272,g295015adf3+81dd352a9d,g2bbee38e9b+469cd937ee,g337abbeb29+469cd937ee,g3939d97d7f+72a9f7b576,g487adcacf7+71499e7cba,g50ff169b8f+5929b3527e,g52b1c1532d+a6fc98d2e7,g591dd9f2cf+df404f777f,g5a732f18d5+be83d3ecdb,g64a986408d+21ad69e7e1,g858d7b2824+21ad69e7e1,g8a8a8dda67+a6fc98d2e7,g99cad8db69+f62e5b0af5,g9ddcbc5298+d4bad12328,ga1e77700b3+9c366c4306,ga8c6da7877+71e4819109,gb0e22166c9+25ba2f69a1,gb6a65358fc+469cd937ee,gbb8dafda3b+69d3c0e320,gc07e1c2157+a98bf949bb,gc120e1dc64+615ec43309,gc28159a63d+469cd937ee,gcf0d15dbbd+72a9f7b576,gdaeeff99f8+a38ce5ea23,ge6526c86ff+3a7c1ac5f1,ge79ae78c31+469cd937ee,gee10cc3b42+a6fc98d2e7,gf1cff7945b+21ad69e7e1,gfbcc870c63+9a11dc8c8f
LSST Data Management Base Package
|
A class representing an angle. More...
#include <Angle.h>
Public Member Functions | |
constexpr | Angle (double val, AngleUnit units=radians) noexcept |
Construct an Angle with the specified value (interpreted in the given units). | |
constexpr | Angle () noexcept |
Construct the zero angle. | |
Angle (sphgeom::Angle const &sgAngle) noexcept | |
Convert from a sphgeom::Angle instance. | |
constexpr | Angle (Angle const &other) noexcept=default |
Copy constructor. | |
constexpr | Angle (Angle &&other) noexcept=default |
Move constructor. | |
Angle & | operator= (Angle const &other) noexcept=default |
Copy assignment. | |
Angle & | operator= (Angle &&other) noexcept=default |
Move assignment. | |
~Angle ()=default | |
constexpr | operator double () const noexcept |
Convert an Angle to a double in radians. | |
operator sphgeom::Angle () const noexcept | |
Convert to a sphgeom::Angle instance. | |
constexpr double | asAngularUnits (AngleUnit const &units) const noexcept |
Return an Angle's value in the specified units. | |
constexpr double | asRadians () const noexcept |
Return an Angle's value in radians. | |
constexpr double | asDegrees () const noexcept |
Return an Angle's value in degrees. | |
constexpr double | asHours () const noexcept |
Return an Angle's value in hours. | |
constexpr double | asArcminutes () const noexcept |
Return an Angle's value in arcminutes. | |
constexpr double | asArcseconds () const noexcept |
Return an Angle's value in arcseconds. | |
constexpr double | asMilliarcseconds () const noexcept |
Return an Angle's value in milliarcseconds. | |
Angle | wrap () const noexcept |
Wrap this angle to the range [0, 2π). | |
Angle | wrapCtr () const noexcept |
Wrap this angle to the range [-π, π). | |
Angle | wrapNear (Angle const &refAng) const noexcept |
Wrap this angle to a value x such that -π ≤ x - refAng ≤ π, approximately. | |
Angle | separation (Angle const &other) const noexcept |
The signed difference between two Angles. | |
Angle & | operator*= (double const &d) noexcept |
Multiply this angle by the given factor. | |
Angle & | operator*= (int const &d) noexcept |
Angle & | operator+= (double const &d) noexcept |
Increase this angle by the given number of radians. | |
Angle & | operator+= (int const &d) noexcept |
Angle & | operator-= (double const &d) noexcept |
Decrease this angle by the given number of radians. | |
Angle & | operator-= (int const &d) noexcept |
constexpr bool | operator== (const Angle &rhs) const noexcept |
Test if two Angles represent the same angle (without wrapping). | |
constexpr bool | operator!= (const Angle &rhs) const noexcept |
constexpr bool | operator<= (const Angle &rhs) const noexcept |
Compare the sizes of two Angles (without wrapping). | |
constexpr bool | operator>= (const Angle &rhs) const noexcept |
constexpr bool | operator< (const Angle &rhs) const noexcept |
constexpr bool | operator> (const Angle &rhs) const noexcept |
std::size_t | hash_value () const noexcept |
Return a hash of this object. | |
Friends | |
class | AngleUnit |
Related Symbols | |
(Note that these are not member symbols.) | |
constexpr Angle | operator+ (Angle a, Angle d) noexcept |
Sum of two angles. | |
constexpr Angle | operator- (Angle a, Angle d) noexcept |
Difference of two angles. | |
constexpr Angle | operator* (Angle a, Angle d) noexcept |
Product of two angles. | |
constexpr Angle | operator* (Angle a, double d) noexcept |
Product of an angle and a scalar. | |
constexpr Angle | operator- (Angle angle) |
An angle in the opposite sense. | |
constexpr Angle | operator/ (Angle a, int d) noexcept |
Ratio of an angle and a scalar. | |
constexpr Angle | operator/ (Angle a, double d) noexcept |
Ratio of an angle and a scalar. | |
std::ostream & | operator<< (std::ostream &s, Angle a) |
Print an Angle to a stream. | |
template<typename T > | |
constexpr Angle | operator* (T lhs, AngleUnit rhs) noexcept |
Use AngleUnit to convert a POD (e.g. int, double) to an Angle; e.g. 180*degrees. | |
A class representing an angle.
Angles may be manipulated like doubles, and automatically converted to doubles, but they may not be constructed from doubles without calling a constructor or multiplying by an AngleUnit. Angles can be modified only by assignment; all other operations that transform an Angle return a new Angle instead.
Unless otherwise specified, all methods and associated operators shall not throw exceptions.
|
inlineconstexprnoexcept |
|
inlineexplicitnoexcept |
Convert from a sphgeom::Angle instance.
Definition at line 143 of file Angle.h.
|
constexprdefaultnoexcept |
Copy constructor.
|
constexprdefaultnoexcept |
Move constructor.
|
default |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
Return an Angle's value in arcminutes.
Definition at line 182 of file Angle.h.
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
Return an Angle's value in milliarcseconds.
Definition at line 188 of file Angle.h.
|
inlineconstexprnoexcept |
|
inlinenoexcept |
|
inlineconstexprnoexcept |
|
inlinenoexcept |
|
inlineconstexprnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlinenoexcept |
Wrap this angle to the range [0, 2π).
Definition at line 410 of file Angle.h.
|
inlinenoexcept |
Wrap this angle to the range [-π, π).
Definition at line 419 of file Angle.h.
Wrap this angle to a value x
such that -π ≤ x - refAng
≤ π, approximately.
refAng | reference angle to match |
x - refAng
in radians. The upper limit in radians and both limits in other units are somewhat squishy, due to roundoff error. Definition at line 438 of file Angle.h.
Use AngleUnit to convert a POD (e.g. int, double) to an Angle; e.g. 180*degrees.
lhs | the value to convert |
rhs | the conversion coefficient |
Definition at line 402 of file Angle.h.
|
related |
Print an Angle to a stream.
The exact details of the string representation are unspecified and subject to change, but the following may be regarded as typical: "0.567 rad"
.
s | The output stream. |
a | The angle. |
Definition at line 29 of file Angle.cc.