Ignore:
Timestamp:
2016-09-05T23:50:16+02:00 (3 years ago)
Author:
Don-vip
Message:

sonar - squid:S1226 - Method parameters, caught exceptions and foreach variables should not be reassigned

File:
1 edited

Legend:

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

    r10938 r10965  
    414414        double up = (vp * cosgamma0 + sp * singamma0) / (0.5 * (qp + temp));
    415415        if (Math.abs(Math.abs(up) - 1.0) < EPSILON) {
    416             x = 0.0;
    417             y = up < 0.0 ? -Math.PI / 2.0 : Math.PI / 2.0;
     416            return new double[] {
     417                up < 0.0 ? -(Math.PI / 2.0) : (Math.PI / 2.0),
     418                0.0};
    418419        } else {
    419             y = Math.pow(e / Math.sqrt((1. + up) / (1. - up)), 1.0 / b);  //calculate t
    420             y = cphi2(y);
    421             x = -Math.atan2(sp * cosgamma0 - vp * singamma0, Math.cos(bra * u)) / b;
    422         }
    423         return new double[] {y, x};
     420            return new double[] {
     421                cphi2(Math.pow(e / Math.sqrt((1. + up) / (1. - up)), 1.0 / b)), //calculate t
     422                -Math.atan2(sp * cosgamma0 - vp * singamma0, Math.cos(bra * u)) / b};
     423        }
    424424    }
    425425
Note: See TracChangeset for help on using the changeset viewer.