GeographicLib 2.2
|
An accurate representation of angles. More...
#include <GeographicLib/AuxAngle.hpp>
Public Member Functions | |
AuxAngle (real y=0, real x=1) | |
Math::real | y () const |
Math::real | x () const |
Math::real & | y () |
Math::real & | x () |
Math::real | degrees () const |
Math::real | radians () const |
Math::real | lam () const |
Math::real | lamd () const |
Math::real | tan () const |
AuxAngle | normalized () const |
void | normalize () |
AuxAngle | copyquadrant (const AuxAngle &p) const |
AuxAngle & | operator+= (const AuxAngle &p) |
Static Public Member Functions | |
static AuxAngle | degrees (real d) |
static AuxAngle | radians (real r) |
static AuxAngle | lam (real psi) |
static AuxAngle | lamd (real psid) |
static AuxAngle | NaN () |
An accurate representation of angles.
This class is an implementation of the methods described in
An angle is represented be the y and x coordinates of a point in the 2d plane. The two coordinates are proportional to the sine and cosine of the angle. This allows angles close to the cardinal points to be represented accurately. It also saves on unnecessary recomputations of trigonometric functions of the angle. Only angles in [−180°, 180°] can be represented. (A possible extension would be to keep count of the number of turns.)
Example of use:
Definition at line 43 of file AuxAngle.hpp.
|
inline |
The constructor.
[in] | y | the y coordinate. |
[in] | x | the x coordinate. |
The defaults (x = 1 and y = 0) are such that
Definition at line 61 of file AuxAngle.hpp.
Referenced by copyquadrant(), degrees(), lam(), lamd(), NaN(), normalized(), and radians().
|
inline |
Definition at line 66 of file AuxAngle.hpp.
Referenced by GeographicLib::AuxLatitude::Authalic(), GeographicLib::Ellipsoid::CircleHeight(), GeographicLib::AuxLatitude::Convert(), copyquadrant(), GeographicLib::DAuxLatitude::DConvert(), degrees(), GeographicLib::AuxLatitude::FromAuxiliary(), GeographicLib::AuxLatitude::Geocentric(), normalized(), GeographicLib::AuxLatitude::Parametric(), and GeographicLib::AuxLatitude::Rectifying().
|
inline |
Definition at line 71 of file AuxAngle.hpp.
Referenced by GeographicLib::AuxLatitude::Authalic(), GeographicLib::Ellipsoid::CircleRadius(), GeographicLib::AuxLatitude::Conformal(), GeographicLib::AuxLatitude::Convert(), copyquadrant(), GeographicLib::DAuxLatitude::DConvert(), degrees(), GeographicLib::AuxLatitude::FromAuxiliary(), GeographicLib::AuxLatitude::Geocentric(), normalized(), operator+=(), GeographicLib::AuxLatitude::Parametric(), and GeographicLib::AuxLatitude::Rectifying().
|
inline |
Definition at line 76 of file AuxAngle.hpp.
|
inline |
Definition at line 81 of file AuxAngle.hpp.
|
inline |
Definition at line 220 of file AuxAngle.hpp.
References GeographicLib::Math::atan2d().
Referenced by GeographicLib::AuxLatitude::Convert(), GeographicLib::Rhumb::GenInverse(), and GeographicLib::RhumbLine::GenPosition().
|
inline |
Definition at line 224 of file AuxAngle.hpp.
Referenced by GeographicLib::AuxLatitude::Convert(), GeographicLib::DAuxLatitude::DConvert(), GeographicLib::DAuxLatitude::DRectifying(), and GeographicLib::Rhumb::GenInverse().
|
inline |
Definition at line 228 of file AuxAngle.hpp.
References tan().
Referenced by GeographicLib::Rhumb::GenInverse().
|
inline |
Definition at line 232 of file AuxAngle.hpp.
References GeographicLib::Math::degree(), and tan().
|
inline |
Definition at line 109 of file AuxAngle.hpp.
Referenced by GeographicLib::AuxLatitude::Authalic(), GeographicLib::AuxLatitude::Conformal(), GeographicLib::DAuxLatitude::DIsometric(), GeographicLib::DAuxLatitude::DParametric(), GeographicLib::DAuxLatitude::DRectifying(), GeographicLib::AuxLatitude::FromAuxiliary(), GeographicLib::Rhumb::GenInverse(), GeographicLib::RhumbLine::GenPosition(), lam(), lamd(), normalized(), operator+=(), and GeographicLib::AuxLatitude::Rectifying().
AuxAngle GeographicLib::AuxAngle::normalized | ( | ) | const |
Definition at line 29 of file AuxAngle.cpp.
References AuxAngle(), NaN(), tan(), x(), and y().
Referenced by GeographicLib::AuxLatitude::Authalic(), GeographicLib::AuxLatitude::Conformal(), GeographicLib::AuxLatitude::Convert(), GeographicLib::DAuxLatitude::DConvert(), and GeographicLib::AuxLatitude::Rectifying().
|
inline |
Normalize the AuxAngle in place so that the y and x components are equal to the sine and cosine of the angle.
Definition at line 120 of file AuxAngle.hpp.
Set the quadrant for the AuxAngle.
[in] | p | the AuxAngle from which the quadrant information is taken. |
Definition at line 45 of file AuxAngle.cpp.
References AuxAngle(), x(), and y().
Referenced by GeographicLib::AuxLatitude::FromAuxiliary().
Add an AuxAngle.
[in] | p | the AuxAngle to be added. |
The addition is done in place, altering the current AuxAngle.
Definition at line 49 of file AuxAngle.cpp.
|
inlinestatic |
Construct and return an AuxAngle specied as an angle in degrees.
[in] | d | the angle measured in degrees. |
This allows a new AuxAngle to be initialized as an angle in degrees with
Definition at line 199 of file AuxAngle.hpp.
References AuxAngle(), GeographicLib::Math::sincosd(), x(), and y().
|
inlinestatic |
Construct and return an AuxAngle specied as an angle in radians.
[in] | r | the angle measured in radians. |
This allows a new AuxAngle to be initialized as an angle in radians with
Definition at line 205 of file AuxAngle.hpp.
References AuxAngle().
|
inlinestatic |
Construct and return an AuxAngle specied by the lambertian of the angle.
[in] | psi | the lambertian of the angle. |
This allows a new AuxAngle to be initialized given the lambertian with
Definition at line 210 of file AuxAngle.hpp.
References AuxAngle().
|
inlinestatic |
Construct and return an AuxAngle specied by the lambertian of the angle in degrees.
[in] | psid | the lambertian of the angle in degrees. |
This allows a new AuxAngle to be initialized given the lambertian with
Definition at line 215 of file AuxAngle.hpp.
References AuxAngle(), and GeographicLib::Math::degree().
|
static |
Definition at line 24 of file AuxAngle.cpp.
References AuxAngle().
Referenced by GeographicLib::AuxLatitude::Convert(), GeographicLib::AuxLatitude::FromAuxiliary(), normalized(), and GeographicLib::AuxLatitude::ToAuxiliary().