Ignore:
Timestamp:
2010-03-27T17:53:47+01:00 (14 years ago)
Author:
jttt
Message:

Use simple casting instead of Math.floor(). Should do the same thing for this number range and it's much faster. Fixed return value of Storage.add()

File:
1 edited

Legend:

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

    r3145 r3158  
    6969    {
    7070        //return Math.round((lon + 180.0) * QuadBuckets.WORLD_PARTS / 360.0)-1;
    71         long ret = (long)Math.floor((lon + 180.0) * WORLD_PARTS / 360.0);
     71        long ret = (long)((lon + 180.0) * WORLD_PARTS / 360.0);
    7272        if (ret == WORLD_PARTS) {
    7373            ret--;
     
    7878    {
    7979        //return Math.round((lat + 90.0) * QuadBuckets.WORLD_PARTS / 180.0)-1;
    80         long ret = (long)Math.floor((lat + 90.0) * WORLD_PARTS / 180.0);
     80        long ret = (long)((lat + 90.0) * WORLD_PARTS / 180.0);
    8181        if (ret == WORLD_PARTS) {
    8282            ret--;
Note: See TracChangeset for help on using the changeset viewer.