#include <NormalizedAngle.h>
NormalizedAngle
is an angle that lies in the range [0, 2π), with one exception - a NormalizedAngle can be NaN.
◆ NormalizedAngle() [1/3]
lsst::sphgeom::NormalizedAngle::NormalizedAngle |
( |
double | a | ) |
|
|
inlineexplicit |
This constructor creates a NormalizedAngle with the given value in radians, normalized to be in the range [0, 2π).
◆ NormalizedAngle() [2/3]
lsst::sphgeom::NormalizedAngle::NormalizedAngle |
( |
LonLat const & | p1, |
|
|
LonLat const & | p2 ) |
This constructor creates a NormalizedAngle equal to the angle between the given points on the unit sphere.
◆ NormalizedAngle() [3/3]
lsst::sphgeom::NormalizedAngle::NormalizedAngle |
( |
Vector3d const & | v1, |
|
|
Vector3d const & | v2 ) |
This constructor creates a NormalizedAngle equal to the angle between the given 3-vectors, which need not have unit norm.
◆ between()
For two angles a and b, between(a, b)
returns the smaller of a.getAngleTo(b)
and b.getAngleTo(a)
. The result will be in the range [0, π].
If one interprets an angle in [0, 2π) as a point on the unit circle, then between
can be thought of as computing the arc length of the shortest unit circle segment between the points for a and b.
◆ center()
For two normalized angles a and b, center(a, b)
returns the angle m such that a.getAngleTo(m)
is equal to m.getAngleTo(b)
.
◆ getAngleTo()
getAngleTo
computes the angle α ∈ [0, 2π) such that adding α to this angle and then normalizing the result yields a
.
If one interprets an angle in [0, 2π) as a point on the unit circle, then this method can be thought of as computing the positive rotation angle required to map this point to a
.
◆ operator Angle const &()
lsst::sphgeom::NormalizedAngle::operator Angle const & |
( |
| ) |
const |
|
inline |
This conversion operator returns a const reference to the underlying Angle. It allows a NormalizedAngle to transparently replace an Angle as an argument in most function calls.
The documentation for this class was generated from the following files: