GeographicLib 2.5
|
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 47 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 65 of file AuxAngle.hpp.
|
inline |
Definition at line 70 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 75 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 80 of file AuxAngle.hpp.
|
inline |
Definition at line 85 of file AuxAngle.hpp.
|
inline |
Definition at line 224 of file AuxAngle.hpp.
References GeographicLib::Math::atan2d().
Referenced by GeographicLib::AuxLatitude::Convert(), GeographicLib::Rhumb::GenInverse(), and GeographicLib::RhumbLine::GenPosition().
|
inline |
Definition at line 228 of file AuxAngle.hpp.
Referenced by GeographicLib::AuxLatitude::Convert(), GeographicLib::DAuxLatitude::DConvert(), GeographicLib::DAuxLatitude::DRectifying(), and GeographicLib::Rhumb::GenInverse().
|
inline |
Definition at line 232 of file AuxAngle.hpp.
References tan().
Referenced by GeographicLib::Rhumb::GenInverse().
|
inline |
Definition at line 236 of file AuxAngle.hpp.
References GeographicLib::Math::degree(), and tan().
|
inline |
Definition at line 113 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 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 124 of file AuxAngle.hpp.
Set the quadrant for the AuxAngle.
[in] | p | the AuxAngle from which the quadrant information is taken. |
Definition at line 44 of file AuxAngle.cpp.
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 48 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 203 of file AuxAngle.hpp.
References 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 209 of file AuxAngle.hpp.
|
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 214 of file AuxAngle.hpp.
|
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 219 of file AuxAngle.hpp.
References GeographicLib::Math::degree().
|
static |
Definition at line 24 of file AuxAngle.cpp.
References GeographicLib::Math::NaN().
Referenced by GeographicLib::AuxLatitude::Convert(), GeographicLib::AuxLatitude::FromAuxiliary(), normalized(), and GeographicLib::AuxLatitude::ToAuxiliary().