10 #if !defined(GEOGRAPHICLIB_POLARSTEREOGRAPHIC_HPP)
11 #define GEOGRAPHICLIB_POLARSTEREOGRAPHIC_HPP 1
15 namespace GeographicLib {
37 real _a, _f, _e2, _e, _e2m, _Cx, _c;
39 static const int numit_ = 5;
40 static inline real overflow() {
43 overflow = 1 /
Math::sq(std::numeric_limits<real>::epsilon());
47 static inline real tanx(real x) {
52 (!(t < 0) ? t : overflow()) :
53 (!(t >= 0) ? t : -overflow());
57 inline real eatanhe(real x)
const {
59 return _f >= 0 ? _e *
Math::atanh(_e * x) : - _e * atan(_e * x);
85 void SetScale(real lat, real k =
real(1));
104 void Forward(
bool northp, real lat, real lon,
105 real& x, real& y, real& gamma, real& k)
const;
122 void Reverse(
bool northp, real x, real y,
123 real& lat, real& lon, real& gamma, real& k)
const;
128 void Forward(
bool northp, real lat, real lon,
129 real& x, real& y)
const {
131 Forward(northp, lat, lon, x, y, gamma, k);
137 void Reverse(
bool northp, real x, real y,
138 real& lat, real& lon)
const {
140 Reverse(northp, x, y, lat, lon, gamma, k);
163 Math::real InverseFlattening()
const {
return 1/_f; }
184 #endif // GEOGRAPHICLIB_POLARSTEREOGRAPHIC_HPP