|
GeographicLib 2.6
|
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 51 of file AuxAngle.hpp.
|
inlineexplicit |
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 69 of file AuxAngle.hpp.
Referenced by copyquadrant(), degrees(), lam(), lamd(), NaN(), normalized(), operator+=(), and radians().
|
inline |
Definition at line 74 of file AuxAngle.hpp.
Referenced by GeographicLib::AuxLatitude::Authalic(), AuxAngle(), 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 79 of file AuxAngle.hpp.
Referenced by GeographicLib::AuxLatitude::Authalic(), AuxAngle(), 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 84 of file AuxAngle.hpp.
|
inline |
Definition at line 89 of file AuxAngle.hpp.
|
inline |
Definition at line 228 of file AuxAngle.hpp.
References GeographicLib::Math::atan2d().
Referenced by GeographicLib::Ellipsoid::CircleHeight(), GeographicLib::Ellipsoid::CircleRadius(), GeographicLib::AuxLatitude::Convert(), GeographicLib::Rhumb::GenInverse(), GeographicLib::RhumbLine::GenPosition(), GeographicLib::Ellipsoid::IsometricLatitude(), and GeographicLib::Ellipsoid::MeridianDistance().
|
inline |
Definition at line 232 of file AuxAngle.hpp.
Referenced by GeographicLib::AuxLatitude::Convert(), GeographicLib::DAuxLatitude::DConvert(), and GeographicLib::DAuxLatitude::DRectifying().
|
inline |
Definition at line 236 of file AuxAngle.hpp.
References tan().
Referenced by GeographicLib::Rhumb::GenInverse().
|
inline |
Definition at line 240 of file AuxAngle.hpp.
References GeographicLib::Math::degree(), and tan().
Referenced by GeographicLib::Ellipsoid::InverseIsometricLatitude().
|
inline |
Definition at line 117 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 28 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(), normalize(), 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 128 of file AuxAngle.hpp.
References normalized().
Set the quadrant for the AuxAngle.
| [in] | p | the AuxAngle from which the quadrant information is taken. |
Definition at line 43 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 47 of file AuxAngle.cpp.
References AuxAngle(), tan(), and x().
|
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 207 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 213 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 218 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 223 of file AuxAngle.hpp.
References AuxAngle(), and GeographicLib::Math::degree().
|
static |
Definition at line 24 of file AuxAngle.cpp.
References AuxAngle(), and GeographicLib::Math::NaN().
Referenced by GeographicLib::AuxLatitude::Convert(), GeographicLib::AuxLatitude::FromAuxiliary(), normalized(), and GeographicLib::AuxLatitude::ToAuxiliary().