Ignore:
Timestamp:
2016-03-17T01:50:12+01:00 (3 years ago)
Author:
Don-vip
Message:

sonar - Local variable and method parameter names should comply with a naming convention

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/coor/QuadTiling.java

    r8510 r10001  
    2323    public static LatLon tile2LatLon(long quad) {
    2424        // The world is divided up into X_PARTS,Y_PARTS.
    25         // The question is how far we move for each bit
    26         // being set.  In the case of the top level, we
    27         // move half of the world.
    28         double x_unit = X_PARTS/2;
    29         double y_unit = Y_PARTS/2;
     25        // The question is how far we move for each bit being set.
     26        // In the case of the top level, we move half of the world.
     27        double xUnit = X_PARTS/2;
     28        double yUnit = Y_PARTS/2;
    3029        long shift = (NR_LEVELS*2)-2;
    3130
     
    3635            // remember x is the MSB
    3736            if ((bits & 0x2) != 0) {
    38                 x += x_unit;
     37                x += xUnit;
    3938            }
    4039            if ((bits & 0x1) != 0) {
    41                 y += y_unit;
     40                y += yUnit;
    4241            }
    43             x_unit /= 2;
    44             y_unit /= 2;
     42            xUnit /= 2;
     43            yUnit /= 2;
    4544            shift -= 2;
    4645        }
     
    6160        }
    6261        return tile;
    63     }
    64 
    65     static long coorToTile(LatLon coor) {
    66         return quadTile(coor);
    6762    }
    6863
     
    8984    public static int index(int level, long quad) {
    9085        long mask = 0x00000003;
    91         int total_shift = TILES_PER_LEVEL_SHIFT*(NR_LEVELS-level-1);
    92         return (int) (mask & (quad >> total_shift));
     86        int totalShift = TILES_PER_LEVEL_SHIFT*(NR_LEVELS-level-1);
     87        return (int) (mask & (quad >> totalShift));
    9388    }
    9489
Note: See TracChangeset for help on using the changeset viewer.