Ignore:
Timestamp:
2018-08-05T20:11:27+02:00 (6 years ago)
Author:
Don-vip
Message:

tools update: awaitility 3.1.2, equalsverifier 2.5.1, jmockit 1.41, reflections 0.9.11, error_prone 2.3.1, proguard 6.0.3, pmd 6.6.0, spotbugs 3.1.6

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/projection/proj/AzimuthalEquidistant.java

    r13601 r14091  
    214214        double lambda = 0;
    215215        double phi = 0;
    216         double c_rh = Math.hypot(x, y);
    217         if (c_rh > Math.PI) {
    218             if (c_rh - EPS10 > Math.PI) {
     216        double cRh = Math.hypot(x, y);
     217        if (cRh > Math.PI) {
     218            if (cRh - EPS10 > Math.PI) {
    219219                throw new JosmRuntimeException("TOLERANCE_ERROR");
    220220            }
    221         } else if (c_rh < EPS10) {
     221        } else if (cRh < EPS10) {
    222222            phi = latitudeOfOrigin;
    223223            lambda = 0.;
    224224        } else {
    225225            if (mode == Mode.OBLIQUE || mode == Mode.EQUATORIAL) {
    226                 double sinc = Math.sin(c_rh);
    227                 double cosc = Math.cos(c_rh);
     226                double sinc = Math.sin(cRh);
     227                double cosc = Math.cos(cRh);
    228228                if (mode == Mode.EQUATORIAL) {
    229                     phi = aasin(y * sinc / c_rh);
     229                    phi = aasin(y * sinc / cRh);
    230230                    x *= sinc;
    231                     y = cosc * c_rh;
     231                    y = cosc * cRh;
    232232                } else { // Oblique
    233                     phi = aasin(cosc * sinph0 + y * sinc * cosph0 / c_rh);
    234                     y = (cosc - sinph0 * Math.sin(phi)) * c_rh;
     233                    phi = aasin(cosc * sinph0 + y * sinc * cosph0 / cRh);
     234                    y = (cosc - sinph0 * Math.sin(phi)) * cRh;
    235235                    x *= sinc * cosph0;
    236236                }
    237237                lambda = (y == 0) ? 0 : Math.atan2(x, y);
    238238            } else if (mode == Mode.NORTH_POLAR) {
    239                 phi = HALF_PI - c_rh;
     239                phi = HALF_PI - cRh;
    240240                lambda = Math.atan2(x, -y);
    241241            } else { // South Polar
    242                 phi = c_rh - HALF_PI;
     242                phi = cRh - HALF_PI;
    243243                lambda = Math.atan2(x, y);
    244244            }
Note: See TracChangeset for help on using the changeset viewer.