Ignore:
Timestamp:
2015-05-21T02:19:24+02:00 (9 years ago)
Author:
Don-vip
Message:

Style - Method returns modified parameter

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2SubGrid.java

    r8379 r8406  
    223223     * <p>This method is thread safe for both memory based and file based node data.
    224224     * @param gs GridShift object containing the coordinate to shift and the shift values
    225      * @return the GridShift object supplied, with values updated.
    226      */
    227     public NTV2GridShift interpolateGridShift(NTV2GridShift gs) {
     225     */
     226    public void interpolateGridShift(NTV2GridShift gs) {
    228227        int lonIndex = (int)((gs.getLonPositiveWestSeconds() - minLon) / lonInterval);
    229228        int latIndex = (int)((gs.getLatSeconds() - minLat) / latInterval);
    230229
    231         double X = (gs.getLonPositiveWestSeconds() - (minLon + (lonInterval * lonIndex))) / lonInterval;
    232         double Y = (gs.getLatSeconds() - (minLat + (latInterval * latIndex))) / latInterval;
     230        double x = (gs.getLonPositiveWestSeconds() - (minLon + (lonInterval * lonIndex))) / lonInterval;
     231        double y = (gs.getLatSeconds() - (minLat + (latInterval * latIndex))) / latInterval;
    233232
    234233        // Find the nodes at the four corners of the cell
     
    240239
    241240        gs.setLonShiftPositiveWestSeconds(interpolate(
    242                 lonShift[indexA], lonShift[indexB], lonShift[indexC], lonShift[indexD], X, Y));
     241                lonShift[indexA], lonShift[indexB], lonShift[indexC], lonShift[indexD], x, y));
    243242
    244243        gs.setLatShiftSeconds(interpolate(
    245                 latShift[indexA], latShift[indexB], latShift[indexC], latShift[indexD], X, Y));
     244                latShift[indexA], latShift[indexB], latShift[indexC], latShift[indexD], x, y));
    246245
    247246        if (lonAccuracy == null) {
     
    250249            gs.setLonAccuracyAvailable(true);
    251250            gs.setLonAccuracySeconds(interpolate(
    252                     lonAccuracy[indexA], lonAccuracy[indexB], lonAccuracy[indexC], lonAccuracy[indexD], X, Y));
     251                    lonAccuracy[indexA], lonAccuracy[indexB], lonAccuracy[indexC], lonAccuracy[indexD], x, y));
    253252        }
    254253
     
    258257            gs.setLatAccuracyAvailable(true);
    259258            gs.setLatAccuracySeconds(interpolate(
    260                     latAccuracy[indexA], latAccuracy[indexB], latAccuracy[indexC], latAccuracy[indexD], X, Y));
    261         }
    262         return gs;
     259                    latAccuracy[indexA], latAccuracy[indexB], latAccuracy[indexC], latAccuracy[indexD], x, y));
     260        }
    263261    }
    264262
Note: See TracChangeset for help on using the changeset viewer.